Function dirs::download_dir

source ·
pub fn download_dir() -> Option<PathBuf>
Expand description

Returns the path to the user’s download directory.

The returned value depends on the operating system and is either a Some, containing a value from the following table, or a None.

PlatformValueExample
LinuxXDG_DOWNLOAD_DIR/home/alice/Downloads
macOS$HOME/Downloads/Users/Alice/Downloads
Windows{FOLDERID_Downloads}C:\Users\Alice\Downloads