plain_path 0.1.0

Expands `~` in a path if present.
Documentation
  • Coverage
  • 100%
    5 out of 5 items documented1 out of 5 items with examples
  • Size
  • Source code size: 21.24 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 445.1 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • azriel91/plain_path
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • azriel91

〽️ 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.