Module path

Source
Expand description

A library for parsing, manipulating Paths that follow unix style conventions.

This is similar to how the standard library’s Path works, but may have less features.

For simplicity, this uses str and String instead of OsStr and OsString. Makes it much easier to work with.

Macros§

impl_cmp 🔒

Structs§

Ancestors
An iterator over Path and its ancestors.
Components
An iterator over the Components of a Path.
Display
Iter
An iterator over the Components of a Path, as str slices.
Path
A slice of a path (akin to str).
PathBuf
An owned, mutable path (akin to String).
StripPrefixError
An error returned from Path::strip_prefix if the prefix was not found.

Enums§

Component
A single component of a path.
State 🔒
Component parsing works by a double-ended state machine; the cursors at the front and back of the path each keep track of what parts of the path have been consumed so far.

Constants§

SEPARATOR
use unix paths separator

Functions§

has_root 🔒
Check if the first char is /
is_separator
is_separator_byte 🔒
iter_after 🔒