summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-02-12 03:50:00 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-02-12 03:50:00 (GMT)
commit1312b4bcfdb85577b317f0024efe271aee18856b (patch)
tree5fa803effd2945a6dd3e3151b997ffcd16a8486b
parent3605b5cee3ae86e014c015242dd82e2f46ba5c5f (diff)
downloadcpython-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.rst5
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()