Skip to content

Commit a969d40

Browse files
committed
File: Add documentation about dropping to sync_all
1 parent 76e82d6 commit a969d40

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libstd/fs.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,13 @@ impl File {
394394

395395
/// Attempts to sync all OS-internal metadata to disk.
396396
///
397-
/// This function will attempt to ensure that all in-core data reaches the
397+
/// This function will attempt to ensure that all in-memory data reaches the
398398
/// filesystem before returning.
399399
///
400+
/// This can be used to handle errors that would otherwise only be caught
401+
/// when the `File` is closed. Dropping a file will ignore errors in
402+
/// synchronizing this in-memory data.
403+
///
400404
/// # Examples
401405
///
402406
/// ```no_run

0 commit comments

Comments
 (0)