2 ms·
> To be clear `File::drop()` does sync It does not. BufWriter<File> flushes its userspace buffer (but doesn't fsync either). If you have a bare File then drop
by the8472 1y ago
> To be clear `File::drop()` does sync
It does not. BufWriter<File> flushes its userspace buffer (but doesn't fsync either). If you have a bare File then drop really just closes the file descriptor, that's it.
https://github.com/rust-lang/rust/blob/ee361e8fca1c30e13e7a31cc82b64c045339d3a8/library/std/src/os/fd/owned.rs#L190 https://github.com/rust-lang/rust/blob/ee361e8fca1c30e13e7a3...
- maxbond 1y agoMy bad, thanks for the correction.