diff options
author | Alisha <anejaalisha@yahoo.com> | 2017-07-09 10:32:12 +0300 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2017-07-17 15:25:19 +0300 |
commit | 3cc8e9ecc9b9524087aad2e8579896e010c3eac9 (patch) | |
tree | 2da1c9919b2ed34820dbeb292462c1f9bc7a3511 | |
parent | f21855c5e32ae4f6f6dd00a89fb80bf583009619 (diff) |
Correct walkdir docs
-rw-r--r-- | src/lib.rs | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -163,8 +163,10 @@ pub type Result<T> = ::std::result::Result<T, Error>; /// A builder to create an iterator for recursively walking a directory. /// /// Results are returned in depth first fashion, with directories yielded -/// before their contents. The order is unspecified. Directory entries `.` -/// and `..` are always omitted. +/// before their contents. If [`contents_first`] is true, contents are yielded +/// before their directories. The order is unspecified but if [`sort_by`] is given, +/// directory entries are sorted according to this function. Directory entries +///`.` and `..` are always omitted. /// /// If an error occurs at any point during iteration, then it is returned in /// place of its corresponding directory entry and iteration continues as @@ -172,6 +174,9 @@ pub type Result<T> = ::std::result::Result<T, Error>; /// is skipped. Iteration may be stopped at any time. When the iterator is /// destroyed, all resources associated with it are freed. /// +/// [`contents_first`]: struct.WalkDir.html#method.contents_first +/// [`sort_by`]: struct.WalkDir.html#method.sort_by +/// /// # Usage /// /// This type implements [`IntoIterator`] so that it may be used as the subject |