Cross-platform file path handling

Type Path

type Path = PosixPath

Struct PosixPath

pub struct PosixPath {
    is_absolute: bool,
    components: ~[~str],
}

Struct WindowsPath

pub struct WindowsPath {
    host: Option<~str>,
    device: Option<~str>,
    is_absolute: bool,
    components: ~[~str],
}

Trait GenericPath

Method from_str

fn from_str(&str) -> Self

Method dirname

fn dirname(&self) -> ~str

Method filename

fn filename(&self) -> Option<~str>

Method filestem

fn filestem(&self) -> Option<~str>

Method filetype

fn filetype(&self) -> Option<~str>

Method with_dirname

fn with_dirname(&self, &str) -> Self

Method with_filename

fn with_filename(&self, &str) -> Self

Method with_filestem

fn with_filestem(&self, &str) -> Self

Method with_filetype

fn with_filetype(&self, &str) -> Self

Method dir_path

fn dir_path(&self) -> Self

Method file_path

fn file_path(&self) -> Self

Method push

fn push(&self, &str) -> Self

Method push_rel

fn push_rel(&self, &Self) -> Self

Method push_many

fn push_many(&self, &[~str]) -> Self

Method pop

fn pop(&self) -> Self

Method unsafe_join

fn unsafe_join(&self, &Self) -> Self

Method is_restricted

fn is_restricted(&self) -> bool

Method normalize

fn normalize(&self) -> Self

Implementation of ::core::clone::Clone for WindowsPath

Method clone

fn clone(&self) -> WindowsPath

Implementation of ::core::cmp::Eq for WindowsPath

Method eq

fn eq(&self, __other: &WindowsPath) -> bool

Method ne

fn ne(&self, __other: &WindowsPath) -> bool

Implementation of ::core::clone::Clone for PosixPath

Method clone

fn clone(&self) -> PosixPath

Implementation of ::core::cmp::Eq for PosixPath

Method eq

fn eq(&self, __other: &PosixPath) -> bool

Method ne

fn ne(&self, __other: &PosixPath) -> bool

Implementation for Path

Method stat

fn stat(&self) -> Option<libc::stat>

Method lstat

fn lstat(&self) -> Option<libc::stat>

Method exists

fn exists(&self) -> bool

Method get_size

fn get_size(&self) -> Option<i64>

Method get_mode

fn get_mode(&self) -> Option<uint>

Implementation for Path

Method get_atime

fn get_atime(&self) -> Option<(i64, int)>

Method get_mtime

fn get_mtime(&self) -> Option<(i64, int)>

Method get_ctime

fn get_ctime(&self) -> Option<(i64, int)>

Implementation of ToStr for PosixPath

Method to_str

fn to_str(&self) -> ~str

Implementation of GenericPath for PosixPath

Method from_str

fn from_str(s: &str) -> PosixPath

Method dirname

fn dirname(&self) -> ~str

Method filename

fn filename(&self) -> Option<~str>

Method filestem

fn filestem(&self) -> Option<~str>

Method filetype

fn filetype(&self) -> Option<~str>

Method with_dirname

fn with_dirname(&self, d: &str) -> PosixPath

Method with_filename

fn with_filename(&self, f: &str) -> PosixPath

Method with_filestem

fn with_filestem(&self, s: &str) -> PosixPath

Method with_filetype

fn with_filetype(&self, t: &str) -> PosixPath

Method dir_path

fn dir_path(&self) -> PosixPath

Method file_path

fn file_path(&self) -> PosixPath

Method push_rel

fn push_rel(&self, other: &PosixPath) -> PosixPath

Method unsafe_join

fn unsafe_join(&self, other: &PosixPath) -> PosixPath

Method is_restricted

fn is_restricted(&self) -> bool

Method push_many

fn push_many(&self, cs: &[~str]) -> PosixPath

Method push

fn push(&self, s: &str) -> PosixPath

Method pop

fn pop(&self) -> PosixPath

Method normalize

fn normalize(&self) -> PosixPath

Implementation of ToStr for WindowsPath

Method to_str

fn to_str(&self) -> ~str

Implementation of GenericPath for WindowsPath

Method from_str

fn from_str(s: &str) -> WindowsPath

Method dirname

fn dirname(&self) -> ~str

Method filename

fn filename(&self) -> Option<~str>

Method filestem

fn filestem(&self) -> Option<~str>

Method filetype

fn filetype(&self) -> Option<~str>

Method with_dirname

fn with_dirname(&self, d: &str) -> WindowsPath

Method with_filename

fn with_filename(&self, f: &str) -> WindowsPath

Method with_filestem

fn with_filestem(&self, s: &str) -> WindowsPath

Method with_filetype

fn with_filetype(&self, t: &str) -> WindowsPath

Method dir_path

fn dir_path(&self) -> WindowsPath

Method file_path

fn file_path(&self) -> WindowsPath

Method push_rel

fn push_rel(&self, other: &WindowsPath) -> WindowsPath

Method unsafe_join

fn unsafe_join(&self, other: &WindowsPath) -> WindowsPath

Method is_restricted

fn is_restricted(&self) -> bool

Method push_many

fn push_many(&self, cs: &[~str]) -> WindowsPath

Method push

fn push(&self, s: &str) -> WindowsPath

Method pop

fn pop(&self) -> WindowsPath

Method normalize

fn normalize(&self) -> WindowsPath

Function Path

fn Path(s: &str) -> Path

Function PosixPath

fn PosixPath(s: &str) -> PosixPath

Function WindowsPath

fn WindowsPath(s: &str) -> WindowsPath

Function normalize

fn normalize(components: &[~str]) -> ~[~str]