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:
-rw-r--r--src/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 58fc2e5..6ce95a3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -971,6 +971,15 @@ impl DirEntry {
&self.path
}
+ /// The full path that this entry represents.
+ ///
+ /// Analogous to [`path`], but moves ownership of the path.
+ ///
+ /// [`path`]: struct.DirEntry.html#method.path
+ pub fn into_path(self) -> PathBuf {
+ self.path
+ }
+
/// Returns `true` if and only if this entry was created from a symbolic
/// link. This is unaffected by the [`follow_links`] setting.
///