[−][src]Function tauri_api::path::resolve_path
pub fn resolve_path<P: AsRef<Path>>(
path: P,
dir: Option<BaseDirectory>
) -> Result<PathBuf>
Resolves the path with the optional base directory.
Example
use tauri_api::path::{resolve_path, BaseDirectory}; let path = resolve_path("path/to/something", Some(BaseDirectory::Config)) .expect("failed to resolve path"); // path is equal to "/home/${whoami}/.config/path/to/something" on Linux