Skip to main content

Module path

Module path 

Source
Expand description

Treating strings as paths. For portability reasons, paths must internally be treated as strings, and converted to paths only by the backend, if required (in-memory backends will typically not need that conversion).

Structs§

Components

Functions§

components
Returns an iterator of the non-empty components of a path, delimited by /. Note that . and .. are treated as components.
file_name
Returns the file name of the path. if it exists. This function tries to replicate the behaviour of std::path::Path::file_name, but with &str instead of Path.
parent
Returns the parent of the path, if it exists. This function tries to replicate the behaviour of std::path::Path::parent, but with &str instead of Path.
pop
Pop the last component off an existing path.
push
Push a path component on an existing path. Only works if extra is a relative path.