Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/azriel91/plain_path

Expands `~` in a path if present.
https://github.com/azriel91/plain_path

Last synced: about 2 months ago
JSON representation

Expands `~` in a path if present.

Awesome Lists containing this project

README

        

# 〽️ Plain Path

Expands `~` in a path if present.

```rust
use std::path::Path;
use plain_path::PlainPathExt;

let path = Path::new("~/.ssh/config").plain()?;

// 🍏: "/Users//.ssh/config"
// 🐧: "/home//.ssh/config"
println!("{}", path.display());
```

## License

Licensed under either of

* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT)

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.