]> git.lizzy.rs Git - rust.git/commitdiff
File: Add documentation about dropping to sync_all
authorChris Gregory <czipperz@gmail.com>
Thu, 4 Apr 2019 03:21:10 +0000 (23:21 -0400)
committerChris Gregory <czipperz@gmail.com>
Thu, 4 Apr 2019 03:21:10 +0000 (23:21 -0400)
src/libstd/fs.rs

index 034564250c3a52fe50a1877ec1eebd117362dc45..c0d4dfc892794530a8713d5558f2facffd1aa3fe 100644 (file)
@@ -394,9 +394,13 @@ pub fn create<P: AsRef<Path>>(path: P) -> io::Result<File> {
 
     /// Attempts to sync all OS-internal metadata to disk.
     ///
-    /// This function will attempt to ensure that all in-core data reaches the
+    /// This function will attempt to ensure that all in-memory data reaches the
     /// filesystem before returning.
     ///
+    /// This can be used to handle errors that would otherwise only be caught
+    /// when the `File` is closed.  Dropping a file will ignore errors in
+    /// synchronizing this in-memory data.
+    ///
     /// # Examples
     ///
     /// ```no_run