2 releases

0.1.2 May 14, 2019
0.1.1 Apr 20, 2019

#5 in #pathbuf

Download history 9/week @ 2024-08-31 6/week @ 2024-09-07 7/week @ 2024-09-14 18/week @ 2024-09-21 14/week @ 2024-09-28 5/week @ 2024-10-05 9/week @ 2024-10-12 9/week @ 2024-10-19 5/week @ 2024-10-26 19/week @ 2024-11-02 9/week @ 2024-11-09 10/week @ 2024-11-16 17/week @ 2024-11-23 6/week @ 2024-11-30 28/week @ 2024-12-07 16/week @ 2024-12-14

69 downloads per month
Used in 2 crates

WTFPL license

5KB
61 lines

pathtbuftools

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

This mostly usefuly when you're doing low-level stuff 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".

Dependencies

~39–435KB