Function get_app_path

Source
pub fn get_app_path() -> Result<PathBuf>
Expand description

Utility function to get the application directory in the user’s files You should prefer to store settings and such here to keep everything centralized.

§Returns

The path that resolves to about ~.local/share/ow-mod-man/.

§Errors

If we can’t get the user’s app data directory.

§Examples

use owmods_core::file::get_app_path;
use std::path::PathBuf;

let app_path = get_app_path().unwrap();
println!("App Path: {}", app_path.to_str().unwrap());