Function dirs::data_dir[][src]

pub fn data_dir() -> Option<PathBuf>

Returns the path to the user’s data 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
Linux$XDG_DATA_HOME or $HOME/.local/share/home/alice/.local/share
macOS$HOME/Library/Application Support/Users/Alice/Library/Application Support
Windows{FOLDERID_RoamingAppData}C:\Users\Alice\AppData\Roaming