pub struct WindowsPath { host: Option<~str>, device: Option<~str>, is_absolute: bool, components: ~[~str], }
impl Clone for WindowsPath
fn clone(&self) -> WindowsPath
Returns a copy of the value. The contents of owned pointers are copied to maintain uniqueness, while the contents of managed pointers are not copied.
impl Eq for WindowsPath
fn eq(&self, __arg_0: &WindowsPath) -> bool
fn ne(&self, __arg_0: &WindowsPath) -> bool
impl ToStr for WindowsPath
fn to_str(&self) -> ~str
Converts the value of self
to an owned string
impl ToCStr for WindowsPath
fn to_c_str(&self) -> CString
Copy the receiver into a CString.
Raises the null_byte
condition if the receiver has an interior null.
unsafe fn to_c_str_unchecked(&self) -> CString
Unsafe variant of to_c_str()
that doesn't check for nulls.
impl GenericPath for WindowsPath
fn from_str(s: &str) -> WindowsPath
Converts a string to a path.
fn with_dirname(&self, d: &str) -> WindowsPath
Returns a new path consisting of self
with the parent directory component replaced
with the given string.
fn with_filename(&self, f: &str) -> WindowsPath
Returns a new path consisting of self
with the file component replaced
with the given string.
fn file_path(&self) -> WindowsPath
Returns the file component of self
, as a new path.
If self
names a directory, returns the empty path.
fn push(&self, s: &str) -> WindowsPath
Returns a new path whose parent directory is self
and whose
file component is the given string.
fn push_many<S: Str>(&self, cs: &[S]) -> WindowsPath
Returns a new path consisting of the path given by the given vector
of strings, relative to self
.
fn pop(&self) -> WindowsPath
Identical to dir_path
except in the case where self
has only one
component. In this case, pop
returns the empty path.
fn unsafe_join(&self, other: &WindowsPath) -> WindowsPath
The same as push_rel
, except that the directory argument must not
contain directory separators in any of its components.
fn is_restricted(&self) -> bool
On Unix, always returns false
. On Windows, returns true
iff self
's
file stem is one of: con
aux
com1
com2
com3
com4
lpt1
lpt2
lpt3
prn
nul
.
fn normalize(&self) -> WindowsPath
Returns a new path that names the same file as self
, without containing
any '.', '..', or empty components. On Windows, uppercases the drive letter
as well.
fn is_absolute(&self) -> bool
Returns true
if self
is an absolute path.
fn components<'a>(&'a self) -> &'a [~str]
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).