diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-02 21:39:14 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-09 18:43:12 -0800 |
| commit | 6bfbad937bdf578e35777d079f8dcfab49758041 (patch) | |
| tree | 7747a164d42ab277add29b2cee1fb98d8dc6db68 /src/libstd/path.rs | |
| parent | 0b56e9b1cb2fc00d7d9bc044e2a78b8fb12f2f1b (diff) | |
| download | rust-6bfbad937bdf578e35777d079f8dcfab49758041.tar.gz rust-6bfbad937bdf578e35777d079f8dcfab49758041.zip | |
std: Add a new `fs` module
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-x | src/libstd/path.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 3f4f1ec4c0d..540c425206c 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 |
