about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorTshepang Lekhonkhobe <tshepang@gmail.com>2015-02-15 03:52:17 +0200
committerTshepang Lekhonkhobe <tshepang@gmail.com>2015-02-15 03:52:17 +0200
commit3e9e32573efd894a11847ebed63fbc63f45f78f0 (patch)
tree4ded165f3965db0a38451295bc8da4dc80ffe19c /src/libstd
parentb63cee4a11fcfecf20ed8419bc3bd6859e6496bc (diff)
downloadrust-3e9e32573efd894a11847ebed63fbc63f45f78f0.tar.gz
rust-3e9e32573efd894a11847ebed63fbc63f45f78f0.zip
doc: fix and expand File::create explanation
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fs.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index 45de67865a6..5f91d173ed2 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -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> {