Expand description
Expands ~
in a path if present.
§Examples
use std::path::Path;
use plain_path::PlainPathExt;
let path = Path::new("~/.ssh/config").plain()?;
// 🍏: "/Users/<user>/.ssh/config"
// 🐧: "/home/<user>/.ssh/config"
println!("{}", path.display());
Structs§
- Home
DirNot Found - Error when the user’s home directory cannot be found.
Traits§
- Plain
Path Ext - Provides the
plain
method to expand~
.
Functions§
- plain
- Returns the path without special expansion characters.