]> granicus.if.org Git - python/commitdiff
os.fsync() should be used to ensure that data is written to disk
authorBenjamin Peterson <benjamin@python.org>
Thu, 12 Feb 2009 03:50:00 +0000 (03:50 +0000)
committerBenjamin Peterson <benjamin@python.org>
Thu, 12 Feb 2009 03:50:00 +0000 (03:50 +0000)
Doc/library/stdtypes.rst

index b383a40829c107da6b90398cc601a5a98fdf48b2..09ba2538fa150430fd27e98a4774185732e72f3b 100644 (file)
@@ -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()