From: Tim Peters Date: Wed, 23 Apr 2003 19:47:14 +0000 (+0000) Subject: Clarified new fsync() docs. X-Git-Tag: v2.3c1~1059 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d1c846b738d72d007569e59dbd96401a0002118;p=python Clarified new fsync() docs. --- diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex index 84376142dd..9714036055 100644 --- a/Doc/lib/libos.tex +++ b/Doc/lib/libos.tex @@ -448,14 +448,15 @@ Availability: \UNIX. \end{funcdesc} \begin{funcdesc}{fsync}{fd} -Force write of file with filedescriptor \var{fd} to disk. +Force write of file with filedescriptor \var{fd} to disk. On \UNIX, +this calls the native \cfunction{fsync()} function; on Windows, the +MS \cfunction{_commit()} function. -On Windows this calls the MS \cfunction{_commit()} function. If you're -starting with a Python file object \var{f}, first do +If you're starting with a Python file object \var{f}, first do \code{\var{f}.flush()}, and then do \code{os.fsync(\var{f}.fileno()}, to ensure that all internal buffers associated with \var{f} are written to disk. -Availability: \UNIX, and Windows starting in 2.3. +Availability: \UNIX, and Windows starting in 2.2.3. \end{funcdesc} \begin{funcdesc}{ftruncate}{fd, length}