Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dervexdev/pathsub
Subtract one path from another, yielding the subtraction difference rather than relative path
https://github.com/dervexdev/pathsub
diff os path rust sub
Last synced: about 1 month ago
JSON representation
Subtract one path from another, yielding the subtraction difference rather than relative path
- Host: GitHub
- URL: https://github.com/dervexdev/pathsub
- Owner: DervexDev
- License: apache-2.0
- Created: 2023-12-11T15:03:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-01T12:29:16.000Z (11 months ago)
- Last Synced: 2024-08-09T10:51:39.553Z (5 months ago)
- Topics: diff, os, path, rust, sub
- Language: Rust
- Homepage: https://crates.io/crates/pathsub
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# pathsub
Subtract one path from another, yielding the subtraction difference rather than relative path, unlike [pathdiff](https://crates.io/crates/pathdiff)
## Example:
```rust
use pathsub::sub_paths;
use std::path::Path;let a = Path::new("foo/bar");
let b = Path::new("foo");sub_paths(a, b); // Some("bar")
```