Struct std::old_path::posix::PathUnstable
[-] [+]
[src]
pub struct Path { // some fields omitted }
Represents a POSIX file path
Methods
impl Path
fn new<T: BytesContainer>(path: T) -> Path
Returns a new Path from a byte vector or string
Panics
Panics the task if the vector contains a NUL.
fn new_opt<T: BytesContainer>(path: T) -> Option<Path>
Returns a new Path from a byte vector or string, if possible
fn components<'a>(&'a self) -> Components<'a>
Returns an iterator that yields each component of the path in turn. Does not distinguish between absolute and relative paths, e.g. /a/b/c and a/b/c yield the same set of components. A path of "/" yields no components. A path of "." yields one component.
fn str_components<'a>(&'a self) -> StrComponents<'a>
Returns an iterator that yields each component of the path as Option<&str>. See components() for details.