diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-02-12 03:50:00 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-02-12 03:50:00 (GMT) |
commit | 1312b4bcfdb85577b317f0024efe271aee18856b (patch) | |
tree | 5fa803effd2945a6dd3e3151b997ffcd16a8486b | |
parent | 3605b5cee3ae86e014c015242dd82e2f46ba5c5f (diff) | |
download | cpython-1312b4bcfdb85577b317f0024efe271aee18856b.zip cpython-1312b4bcfdb85577b317f0024efe271aee18856b.tar.gz cpython-1312b4bcfdb85577b317f0024efe271aee18856b.tar.bz2 |
os.fsync() should be used to ensure that data is written to disk
-rw-r--r-- | Doc/library/stdtypes.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index b383a40..09ba253 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -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() |