From a39a2b0be6f6e845afe414634fb8409cf137dd1f Mon Sep 17 00:00:00 2001 From: Sean Coates Date: Sat, 3 Mar 2007 18:24:00 +0000 Subject: [PATCH] add note about atomic fwrites in append mode git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@231084 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/filesystem/functions/fwrite.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/reference/filesystem/functions/fwrite.xml b/reference/filesystem/functions/fwrite.xml index c85ab26f18..5863b8437c 100644 --- a/reference/filesystem/functions/fwrite.xml +++ b/reference/filesystem/functions/fwrite.xml @@ -1,5 +1,5 @@ - + @@ -41,6 +41,17 @@ fopen mode parameter. + + + If handle was fopened in + append mode, fwrites are atomic (unless the size of + string exceeds the filesystem's block size, on some + platforms, and as long as the file is on a local filesystem). That is, + there is no need to flock a resource before calling + fwrite; all of the data will be written without + interruption. + + A simple <function>fwrite</function> example