Function dirs::data_local_dir
source · pub fn data_local_dir() -> Option<PathBuf>
Expand description
Returns the path to the user’s local 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
.
Platform | Value | Example |
---|---|---|
Linux | $XDG_DATA_HOME or $HOME /.local/share | /home/alice/.local/share |
macOS | $HOME /Library/Application Support | /Users/Alice/Library/Application Support |
Windows | {FOLDERID_LocalAppData} | C:\Users\Alice\AppData\Local |