#path #api #python #wrapper #join #path-buf #pathlib

pathdiv

This library provides an API similar to pathlib of python

1 unstable release

0.1.0 May 11, 2020

#2322 in Development tools

22 downloads per month
Used in raoc

MIT license

12KB
261 lines

pathdiv

Rust

This library provides an API similar to pathlib of python. "/" can be used to join the path. PathDiv is a wrapper for PathBuf.

Example

use pathdiv::PathDiv;

let mut path = PathDiv::from("/etc");
path = path / "init.d";
path /= "ssh";
println!("{}", path); // "/etc/init.d/ssh"

lib.rs:

This library provides an API similar to pathlib of python. "/" can be used to join the path. PathDiv is a wrapper for PathBuf.

Examples

use pathdiv::PathDiv;

let mut path = PathDiv::from("/etc");
path = path / "init.d";
path /= "ssh";
println!("{}", path); // "/etc/init.d/ssh"

No runtime deps