Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/azriel91/plain_path
- Owner: azriel91
- License: apache-2.0
- Created: 2021-03-13T08:13:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-13T08:14:35.000Z (almost 4 years ago)
- Last Synced: 2024-10-14T02:47:48.857Z (3 months ago)
- Language: Rust
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
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.