1
Fork 0

doc: fix and expand File::create explanation

This commit is contained in:
Tshepang Lekhonkhobe 2015-02-15 03:52:17 +02:00
parent b63cee4a11
commit 3e9e32573e

View file

@ -112,10 +112,10 @@ impl File {
OpenOptions::new().read(true).open(path)
}
/// Creates a open a file in write-only mode.
/// Open a file in write-only mode.
///
/// This method will attempt to open a new file, truncating it if it already
/// exists.
/// This function will create a file it it does not exist,
/// and will truncate it if it does.
///
/// See the `OpenOptions::open` function for more details.
pub fn create<P: AsPath + ?Sized>(path: &P) -> io::Result<File> {