diff options
| author | Lindsey Kuper <lindsey@composition.al> | 2013-09-01 01:33:41 -0400 |
|---|---|---|
| committer | Lindsey Kuper <lindsey@composition.al> | 2013-09-05 06:25:23 -0400 |
| commit | 59291eb197fad9a0fe3e94afda826f3abf1761ab (patch) | |
| tree | 32c93eb2bdc0692a33b2c98718b4dd269475e709 /src/libstd | |
| parent | 8651011b6fffb7f95a354ce85eeb1d2aa4b476a5 (diff) | |
| download | rust-59291eb197fad9a0fe3e94afda826f3abf1761ab.tar.gz rust-59291eb197fad9a0fe3e94afda826f3abf1761ab.zip | |
Minor doc cleanup.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/path.rs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 16af8b1da3e..58668775136 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -58,10 +58,10 @@ pub fn PosixPath(s: &str) -> PosixPath { } pub trait GenericPath : Clone + Eq + ToStr { - /// Converts a string to a Path + /// Converts a string to a path. fn from_str(&str) -> Self; - /// Returns the directory component of `self`, as a string + /// Returns the directory component of `self`, as a string. fn dirname(&self) -> ~str { let s = self.dir_path().to_str(); match s.len() { @@ -152,17 +152,17 @@ pub trait GenericPath : Clone + Eq + ToStr { /// If `self` names a directory, returns the empty path. fn file_path(&self) -> Self; - /// Returns a new Path whose parent directory is `self` and whose + /// Returns a new path whose parent directory is `self` and whose /// file component is the given string. fn push(&self, (&str)) -> Self; - /// Returns a new Path consisting of the given path, made relative to `self`. + /// Returns a new path consisting of the given path, made relative to `self`. fn push_rel(&self, other: &Self) -> Self { assert!(!other.is_absolute()); self.push_many(other.components()) } - /// Returns a new Path consisting of the path given by the given vector + /// Returns a new path consisting of the path given by the given vector /// of strings, relative to `self`. fn push_many<S: Str>(&self, (&[S])) -> Self; @@ -174,9 +174,9 @@ pub trait GenericPath : Clone + Eq + ToStr { /// contain directory separators in any of its components. fn unsafe_join(&self, (&Self)) -> Self; - /// On Unix, always returns false. On Windows, returns true iff `self`'s + /// 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` + /// `lpt1` `lpt2` `lpt3` `prn` `nul`. fn is_restricted(&self) -> bool; /// Returns a new path that names the same file as `self`, without containing @@ -187,7 +187,8 @@ pub trait GenericPath : Clone + Eq + ToStr { /// Returns `true` if `self` is an absolute path. fn is_absolute(&self) -> bool; - /// True if `self` is an ancestor of `other`. See `test_is_ancestor_of` for examples + /// True if `self` is an ancestor of `other`. + // See `test_is_ancestor_of` for examples. fn is_ancestor_of(&self, other: &Self) -> bool { debug!("%s / %s %? %?", self.to_str(), other.to_str(), self.is_absolute(), self.components().len()); @@ -197,7 +198,7 @@ pub trait GenericPath : Clone + Eq + ToStr { self.is_ancestor_of(&other.pop())) } - /// Find the relative path from one file to another + /// Finds the relative path from one file to another. fn get_relative_to(&self, abs2: (&Self)) -> Self { assert!(self.is_absolute()); assert!(abs2.is_absolute()); @@ -516,7 +517,7 @@ impl PosixPath { } } - /// Execute a function on p as well as all of its ancestors + /// Executes a function `f` on `self` as well as on all of its ancestors. pub fn each_parent(&self, f: &fn(&Path)) { if !self.components.is_empty() { f(self); @@ -618,7 +619,7 @@ impl WindowsPath { } } - /// Execute a function on p as well as all of its ancestors + /// Executes a function `f` on `self` as well as on all of its ancestors. pub fn each_parent(&self, f: &fn(&Path)) { if !self.components.is_empty() { f(self); |
