Function dirs::document_dir

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

Returns the path to the user’s document 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_DOCUMENTS_DIR/home/alice/Documents
macOS$HOME/Documents/Users/Alice/Documents
Windows{FOLDERID_Documents}C:\Users\Alice\Documents