CVS update: php3/doc/functions
| From: | sas | Date: | Sun, 31 Jan 1999 16:15:24 +0000 |
| Subject: | CVS update: php3/doc/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-3802@lists.php.net to get a copy of this message | ||
Date: Sunday January 31, 1999 @ 11:15
Author: sas
Update of /repository/php3/doc/functions
In directory asf:/u/temp/cvs-serv26813/doc/functions
Modified Files:
filesystem.sgml
Log Message:
Add PHP3 flock() support
Index: php3/doc/functions/filesystem.sgml
diff -c php3/doc/functions/filesystem.sgml:1.34 php3/doc/functions/filesystem.sgml:1.35
*** php3/doc/functions/filesystem.sgml:1.34 Mon Jan 18 07:45:32 1999
--- php3/doc/functions/filesystem.sgml Sun Jan 31 11:15:16 1999
***************
*** 615,620 ****
--- 615,655 ----
</refsect1>
</refentry>
+ <refentry id="function.flock">
+ <refnamediv>
+ <refname>flock</refname>
+ <refpurpose>portable file locking</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcdef>bool <function>flock</function></funcdef>
+ <paramdef>int <parameter>fp</parameter></paramdef>
+ <paramdef>int <parameter>operation</parameter></paramdef>
+ </funcsynopsis>
+ <simpara>
+ PHP supports a portable way of locking whole files in an
+ advisory way (which means all accessing programs have to
+ use the same way of locking or it will not work).
+
+ <simpara>
+ To lock a file, you have to open it first and pass the
+ resulting file pointer to flock. The operations you can
+ use are 1 for locking the file as a reader (shared lock),
+ 2 for locking the file as a writer (exclusive lock) and
+ 3 for releasing a lock. This enables a simple reader/writer
+ model which can be used on almost every platform (including
+ most Unixes and even Windows).
+
+ <simpara>
+ If you add 4 to the operation parameter, locking will be tried
+ in a non-blocking way. It returns false, if the lock cannot
+ be acquired non-blocking. Otherwise, flock will always
+ return true.
+
+ </refsect1>
+ </refentry>
+
<refentry id="function.fopen">
<refnamediv>
<refname>fopen</refname>
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net