1
Fork 0

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
This commit is contained in:
Alex Crichton 2015-02-02 21:39:14 -08:00
parent 0b56e9b1cb
commit 6bfbad937b
15 changed files with 2564 additions and 13 deletions

View file

@ -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