plain_path

Crates.ioplain_path
lib.rsplain_path
version0.1.0
sourcesrc
created_at2021-03-13 08:14:23.428383
updated_at2021-03-13 08:14:23.428383
descriptionExpands `~` in a path if present.
homepage
repositoryhttps://github.com/azriel91/plain_path
max_upload_size
id368223
size17,522
Azriel Hoh (azriel91)

documentation

https://docs.rs/plain_path/

README

〽️ Plain Path

Expands ~ in a path if present.

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());

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 1

cargo fmt