Cross-platform file path handling
Path
PosixPath
WindowsPath
GenericPath
of core::cmp::Eq for WindowsPath
of core::cmp::Eq for PosixPath
for Path
for Path
of ToStr for PosixPath
of GenericPath for PosixPath
of ToStr for WindowsPath
of GenericPath for WindowsPath
Path
PosixPath
WindowsPath
normalize
path::stat
path::windows
Path
type Path = PosixPath
PosixPath
pub struct PosixPath {
is_absolute: bool,
components: ~[~str],
}
WindowsPath
pub struct WindowsPath {
host: Option<~str>,
device: Option<~str>,
is_absolute: bool,
components: ~[~str],
}
GenericPath
from_str
fn from_str(&str) -> self
dirname
fn dirname() -> ~str
filename
fn filename() -> Option<~str>
filestem
fn filestem() -> Option<~str>
filetype
fn filetype() -> Option<~str>
with_dirname
fn with_dirname(&str) -> self
with_filename
fn with_filename(&str) -> self
with_filestem
fn with_filestem(&str) -> self
with_filetype
fn with_filetype(&str) -> self
dir_path
fn dir_path() -> self
file_path
fn file_path() -> self
push
fn push(&str) -> self
push_rel
fn push_rel(&self) -> self
push_many
fn push_many(&[~str]) -> self
pop
fn pop() -> self
normalize
fn normalize() -> self
core::cmp::Eq
for WindowsPath
eq
fn eq(__other: &WindowsPath) -> bool
ne
fn ne(__other: &WindowsPath) -> bool
core::cmp::Eq
for PosixPath
eq
fn eq(__other: &PosixPath) -> bool
ne
fn ne(__other: &PosixPath) -> bool
Path
stat
fn stat() -> Option<libc::stat>
lstat
fn lstat() -> Option<libc::stat>
exists
fn exists() -> bool
get_size
fn get_size() -> Option<i64>
get_mode
fn get_mode() -> Option<uint>
Path
get_atime
fn get_atime() -> Option<(i64, int)>
get_mtime
fn get_mtime() -> Option<(i64, int)>
get_ctime
fn get_ctime() -> Option<(i64, int)>
ToStr
for PosixPath
to_str
fn to_str() -> ~str
GenericPath
for PosixPath
from_str
fn from_str(s: &str) -> PosixPath
dirname
fn dirname() -> ~str
filename
fn filename() -> Option<~str>
filestem
fn filestem() -> Option<~str>
filetype
fn filetype() -> Option<~str>
with_dirname
fn with_dirname(d: &str) -> PosixPath
with_filename
fn with_filename(f: &str) -> PosixPath
with_filestem
fn with_filestem(s: &str) -> PosixPath
with_filetype
fn with_filetype(t: &str) -> PosixPath
dir_path
fn dir_path() -> PosixPath
file_path
fn file_path() -> PosixPath
push_rel
fn push_rel(other: &PosixPath) -> PosixPath
push_many
fn push_many(cs: &[~str]) -> PosixPath
push
fn push(s: &str) -> PosixPath
pop
fn pop() -> PosixPath
normalize
fn normalize() -> PosixPath
ToStr
for WindowsPath
to_str
fn to_str() -> ~str
GenericPath
for WindowsPath
from_str
fn from_str(s: &str) -> WindowsPath
dirname
fn dirname() -> ~str
filename
fn filename() -> Option<~str>
filestem
fn filestem() -> Option<~str>
filetype
fn filetype() -> Option<~str>
with_dirname
fn with_dirname(d: &str) -> WindowsPath
with_filename
fn with_filename(f: &str) -> WindowsPath
with_filestem
fn with_filestem(s: &str) -> WindowsPath
with_filetype
fn with_filetype(t: &str) -> WindowsPath
dir_path
fn dir_path() -> WindowsPath
file_path
fn file_path() -> WindowsPath
push_rel
fn push_rel(other: &WindowsPath) -> WindowsPath
push_many
fn push_many(cs: &[~str]) -> WindowsPath
push
fn push(s: &str) -> WindowsPath
pop
fn pop() -> WindowsPath
normalize
fn normalize() -> WindowsPath
Path
fn Path(s: &str) -> Path
PosixPath
fn PosixPath(s: &str) -> PosixPath
WindowsPath
fn WindowsPath(s: &str) -> WindowsPath
normalize
fn normalize(components: &[~str]) -> ~[~str]