|
rstd 0.1.0
|
An owned, mutable filesystem path, analogous to Rust's PathBuf.
More...
Public Member Functions | |
| auto | as_path () const noexcept -> ref< Path > |
Returns a borrowed ref<Path>. | |
| auto | into_os_string () -> OsString |
Consumes the PathBuf and returns the inner OsString. | |
| void | push (ref< Path > component) |
Extends the path with component. | |
| auto | pop () -> bool |
Removes the last component. Returns false if already at root/empty. | |
| auto | join (ref< Path > component) const -> PathBuf |
Creates a new PathBuf by joining this path with a component. | |
| operator ref< Path > () const noexcept | |
Implicit conversion to ref<Path>. | |
Static Public Member Functions | |
| static auto | make () -> PathBuf |
Creates an empty PathBuf. | |
| static auto | from (String &&s) -> PathBuf |
Creates a PathBuf from a String. | |
| static auto | from (ref< str > s) -> PathBuf |
Creates a PathBuf from a ref<str>. | |
| static auto | from (OsString &&s) -> PathBuf |
Creates a PathBuf from an OsString. | |
| static auto | from (const char *s) -> PathBuf |
Creates a PathBuf from a C string. | |
An owned, mutable filesystem path, analogous to Rust's PathBuf.
Extends the path with component.
If component is absolute, it replaces the current path. Otherwise, a separator is inserted if needed and component is appended.