about summary refs log tree commit diff
path: root/src/libstd/path.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-02-10 04:07:03 +0000
committerbors <bors@rust-lang.org>2015-02-10 04:07:03 +0000
commit0bfe358e0fe3b35f0434e81e7c53ea844e95cc13 (patch)
tree091fc970b94cf86a68fd62febef1c5648f5b0d9d /src/libstd/path.rs
parent134e00be7751a9fdc820981962e4fd7ea97bfff6 (diff)
parent6bfbad937bdf578e35777d079f8dcfab49758041 (diff)
downloadrust-0bfe358e0fe3b35f0434e81e7c53ea844e95cc13.tar.gz
rust-0bfe358e0fe3b35f0434e81e7c53ea844e95cc13.zip
Auto merge of #21936 - alexcrichton:fsv2, r=aturon
This commit is an implementation of [RFC 739][rfc] which adds a new `std::fs`
module to the standard library. This module provides much of the same
functionality as `std::old_io::fs` but it has many tweaked APIs as well as uses
the new `std::path` module.

[rfc]: https://github.com/rust-lang/rfcs/pull/739
Diffstat (limited to 'src/libstd/path.rs')
-rwxr-xr-xsrc/libstd/path.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index cb213863030..776fa270867 100755
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -999,6 +999,12 @@ impl cmp::Ord for PathBuf {
     }
 }
 
+impl AsOsStr for PathBuf {
+    fn as_os_str(&self) -> &OsStr {
+        &self.inner[]
+    }
+}
+
 /// A slice of a path (akin to `str`).
 ///
 /// This type supports a number of operations for inspecting a path, including