Crates.io | pathsub |
lib.rs | pathsub |
version | 0.1.1 |
source | src |
created_at | 2023-12-11 15:07:34.327965 |
updated_at | 2023-12-11 18:18:22.053175 |
description | Subtract one path from another, yielding the subtraction difference rather than relative path |
homepage | |
repository | https://github.com/DervexHero/pathsub |
max_upload_size | |
id | 1065289 |
size | 16,205 |
Subtract one path from another, yielding the subtraction difference rather than relative path, unlike pathdiff
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")