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§
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&strinstead ofPath. - parent
- Returns the parent of the path, if it exists. This function tries
to replicate the behaviour of
std::path::Path::parent, but with&strinstead ofPath. - pop
- Pop the last component off an existing path.
- push
- Push a path component on an existing path. Only works if
extrais a relative path.