#path #relative-path #sub #diff #os

pathsub

Subtract one path from another, yielding the subtraction difference rather than relative path

1 unstable release

0.1.1 Dec 11, 2023
0.1.0 Dec 11, 2023

#631 in Filesystem

Apache-2.0

6KB
58 lines

pathsub

Subtract one path from another, yielding the subtraction difference rather than relative path, unlike pathdiff

Version badge Downloads badge License badge

Example:

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")

lib.rs:

pathsub

Subtract one path from another, returns subtraction difference not the relative path

Example:

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")

Made with <3 by Dervex

No runtime deps