pathtools

Crates.iopathtools
lib.rspathtools
version0.1.0
sourcesrc
created_at2019-04-18 12:29:38.116381
updated_at2019-04-18 12:29:38.116381
descriptionAdditional helper methods for Path
homepagehttps://github.com/rabite0/pathtools
repositoryhttps://github.com/rabite0/pathtools
max_upload_size
id128664
size4,275
(rabite0)

documentation

README

pathtools

pathtools is a small library that adds some helper methods which are useful when working with Paths.

This mostly usefuly when you're doing low-level stuff on UNIX systems with files. I factored this library out of hunter, so for the most part it contains stuff I needed there, plus a bit more I stopped using.

Available methods and their singatures are:

fn short_path(&self) -> PathBuf;
fn short_string(&self) -> String;
fn name_starts_with(&self, pat: &str) -> bool;
fn quoted_file_name(&self) -> Option<OsString>;
fn quoted_path(&self) -> OsString;

NOTE: short_path() removes the $HOME component of a Path and replaces it with , so "/home/foo/bar" becomes "/bar".

Commit count: 7

cargo fmt