Skip to main content

data_dir

Function data_dir 

Source
pub fn data_dir() -> PathBuf
Expand description

The directory this app keeps saved data in, created when missing.

The location follows the platform convention for user data: $XDG_DATA_HOME (else ~/.local/share) on Linux, ~/Library/Application Support on macOS, %APPDATA% on Windows. Each app gets lumen/<app-id> under that root, so two apps sharing a machine keep their saves apart. A machine that offers no per-user data root at all falls back to the app directory.