mirror of
https://github.com/python/cpython.git
synced 2025-09-24 17:33:29 +00:00
os.fsync() should be used to ensure that data is written to disk
This commit is contained in:
parent
3605b5cee3
commit
1312b4bcfd
1 changed files with 5 additions and 0 deletions
|
@ -2110,6 +2110,11 @@ Files have the following methods:
|
|||
Flush the internal buffer, like ``stdio``'s :cfunc:`fflush`. This may be a
|
||||
no-op on some file-like objects.
|
||||
|
||||
.. note::
|
||||
|
||||
:meth:`flush` does not necessarily write the file's data to disk. Use
|
||||
:meth:`flush` followed by :func:`os.fsync` to ensure this behavior.
|
||||
|
||||
|
||||
.. method:: file.fileno()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue