Cross-platform file path handling
Path
PosixPath
WindowsPath
GenericPath
of ::core::clone::Clone for WindowsPath
of ::core::cmp::Eq for WindowsPath
of ::core::clone::Clone for PosixPath
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::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(&self) -> ~str
filename
fn filename(&self) -> Option<~str>
filestem
fn filestem(&self) -> Option<~str>
filetype
fn filetype(&self) -> Option<~str>
with_dirname
fn with_dirname(&self, &str) -> Self
with_filename
fn with_filename(&self, &str) -> Self
with_filestem
fn with_filestem(&self, &str) -> Self
with_filetype
fn with_filetype(&self, &str) -> Self
dir_path
fn dir_path(&self) -> Self
file_path
fn file_path(&self) -> Self
push
fn push(&self, &str) -> Self
push_rel
fn push_rel(&self, &Self) -> Self
push_many
fn push_many(&self, &[~str]) -> Self
pop
fn pop(&self) -> Self
unsafe_join
fn unsafe_join(&self, &Self) -> Self
is_restricted
fn is_restricted(&self) -> bool
normalize
fn normalize(&self) -> Self
::core::clone::Clone
for WindowsPath
clone
fn clone(&self) -> WindowsPath
::core::cmp::Eq
for WindowsPath
eq
fn eq(&self, __other: &WindowsPath) -> bool
ne
fn ne(&self, __other: &WindowsPath) -> bool
::core::clone::Clone
for PosixPath
clone
fn clone(&self) -> PosixPath
::core::cmp::Eq
for PosixPath
eq
fn eq(&self, __other: &PosixPath) -> bool
ne
fn ne(&self, __other: &PosixPath) -> bool
Path
stat
fn stat(&self) -> Option<libc::stat>
lstat
fn lstat(&self) -> Option<libc::stat>
exists
fn exists(&self) -> bool
get_size
fn get_size(&self) -> Option<i64>
get_mode
fn get_mode(&self) -> Option<uint>
Path
get_atime
fn get_atime(&self) -> Option<(i64, int)>
get_mtime
fn get_mtime(&self) -> Option<(i64, int)>
get_ctime
fn get_ctime(&self) -> Option<(i64, int)>
ToStr
for PosixPath
to_str
fn to_str(&self) -> ~str
GenericPath
for PosixPath
from_str
fn from_str(s: &str) -> PosixPath
dirname
fn dirname(&self) -> ~str
filename
fn filename(&self) -> Option<~str>
filestem
fn filestem(&self) -> Option<~str>
filetype
fn filetype(&self) -> Option<~str>
with_dirname
fn with_dirname(&self, d: &str) -> PosixPath
with_filename
fn with_filename(&self, f: &str) -> PosixPath
with_filestem
fn with_filestem(&self, s: &str) -> PosixPath
with_filetype
fn with_filetype(&self, t: &str) -> PosixPath
dir_path
fn dir_path(&self) -> PosixPath
file_path
fn file_path(&self) -> PosixPath
push_rel
fn push_rel(&self, other: &PosixPath) -> PosixPath
unsafe_join
fn unsafe_join(&self, other: &PosixPath) -> PosixPath
is_restricted
fn is_restricted(&self) -> bool
push_many
fn push_many(&self, cs: &[~str]) -> PosixPath
push
fn push(&self, s: &str) -> PosixPath
pop
fn pop(&self) -> PosixPath
normalize
fn normalize(&self) -> PosixPath
ToStr
for WindowsPath
to_str
fn to_str(&self) -> ~str
GenericPath
for WindowsPath
from_str
fn from_str(s: &str) -> WindowsPath
dirname
fn dirname(&self) -> ~str
filename
fn filename(&self) -> Option<~str>
filestem
fn filestem(&self) -> Option<~str>
filetype
fn filetype(&self) -> Option<~str>
with_dirname
fn with_dirname(&self, d: &str) -> WindowsPath
with_filename
fn with_filename(&self, f: &str) -> WindowsPath
with_filestem
fn with_filestem(&self, s: &str) -> WindowsPath
with_filetype
fn with_filetype(&self, t: &str) -> WindowsPath
dir_path
fn dir_path(&self) -> WindowsPath
file_path
fn file_path(&self) -> WindowsPath
push_rel
fn push_rel(&self, other: &WindowsPath) -> WindowsPath
unsafe_join
fn unsafe_join(&self, other: &WindowsPath) -> WindowsPath
is_restricted
fn is_restricted(&self) -> bool
push_many
fn push_many(&self, cs: &[~str]) -> WindowsPath
push
fn push(&self, s: &str) -> WindowsPath
pop
fn pop(&self) -> WindowsPath
normalize
fn normalize(&self) -> 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]