Crate plain_path[−][src]
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
HomeDirNotFound | Error when the user’s home directory cannot be found. |
Traits
PlainPathExt | Provides the |
Functions
plain | Returns the path without special expansion characters. |