rs-fs-path 0.1.0
Normalize, join and relativize paths as text with both slash styles understood, plus extension helpers
Install
cargo add rs-fs-path --registry rupm
In Ruststudio: Packages, search for rs-fs-path, Install.
Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-23.
Versions
- 0.1.0 2026-11-23
README
# rs-fs-path
Normalize, join and relativize paths as text with both slash styles understood, plus extension helpers
Add it with `rupm add rs-fs-path` (or `cargo add rs-fs-path --registry rupm`).
```rust
assert_eq!(rs_fs_path::normalize("a/./b/../c/d"), "a/c/d");
assert_eq!(rs_fs_path::join("/srv/app", "../logs/x.txt"), "/srv/logs/x.txt");
assert_eq!(rs_fs_path::relative("/a/b/c", "/a/d"), "../../d");
assert_eq!(rs_fs_path::extension("photo.tar.gz"), Some("gz"));
assert_eq!(rs_fs_path::with_extension("notes.txt", "md"), "notes.md");
```