mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
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
This commit is contained in:
parent
807f1ae20b
commit
a39a2b0be6
1 changed files with 12 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.14 $ -->
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.fwrite">
|
||||
<refnamediv>
|
||||
|
@ -41,6 +41,17 @@
|
|||
<function>fopen</function> mode parameter.
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<para>
|
||||
If <parameter>handle</parameter> was <function>fopen</function>ed in
|
||||
append mode, <function>fwrite</function>s are atomic (unless the size of
|
||||
<parameter>string</parameter> 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 <function>flock</function> a resource before calling
|
||||
<function>fwrite</function>; all of the data will be written without
|
||||
interruption.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<example>
|
||||
<title>A simple <function>fwrite</function> example</title>
|
||||
|
|
Loading…
Reference in a new issue