Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/walkdir.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlisha <anejaalisha@yahoo.com>2017-07-09 10:32:12 +0300
committerAndrew Gallant <jamslam@gmail.com>2017-07-17 15:25:19 +0300
commit3cc8e9ecc9b9524087aad2e8579896e010c3eac9 (patch)
tree2da1c9919b2ed34820dbeb292462c1f9bc7a3511
parentf21855c5e32ae4f6f6dd00a89fb80bf583009619 (diff)
Correct walkdir docs
-rw-r--r--src/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0db8894..13cfe99 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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