pub fn get_app_dir(app_name: &str, _roaming: bool) -> PathBufExpand description
Get the platform-specific application directory.
Returns the appropriate directory for storing application data based on the platform:
- Unix:
~/.app_name(non-roaming) or~/.local/share/app_name(roaming) - macOS:
~/Library/Application Support/app_name - Windows:
%APPDATA%\app_name(roaming) or%LOCALAPPDATA%\app_name(non-roaming)
§Arguments
app_name- The name of the applicationroaming- Whether to use the roaming profile (Windows) or XDG data dir (Unix)
§Example
use click::utils::get_app_dir;
let app_dir = get_app_dir("myapp", false);
println!("App directory: {}", app_dir.display());