smart_path/lib.rs
1//! Wrapper around PathBuf to provide extra features for popping,
2//! pushing, indexing and generally manipulation of paths. All the same
3//! conversions and method signatures, making `SmartPathBuf`
4//! isomorphic to `PathBuf`. It implements `Deref` with
5//! `Target` `Path` so all of paths functionality is available.
6//!
7//! ## Examples where useful
8//! ```
9//! use smart_path::SmartPathBuf;
10//!
11//! let dir = std::env::current_dir().expect("failed");
12//! let mut s_path = SmartPathBuf::from(&dir);
13//!
14//! s_path.push("to/file");
15//! // do_something(&s_path); // "current/dir/to/file"
16//!
17//! s_path.initial();
18//! // "current/dir"
19//!
20//! s_path.push("another/file");
21//! // do_more(&s_path);
22//! ```
23//!
24
25mod s_path_buf;
26pub use s_path_buf::{PathRange, SmartPathBuf};