cvs: phpdoc /en/reference/filesystem/functions chgrp.xml chown.xml copy.xml delete.xml disk-free-space.xml disk-total-space.xml diskfreespace.xml
fclose.xml feof.xml fflush.xml fgetcsv.xml fgets.xml file-exists.xml file-put-contents.xml file.xml filectime.xml filegroup.xml fileinode.xml
filemtime.xml fileowner.xml fileperms.xml filesize.xml fopen.xml fputs.xml ftell.xml glob.xml is-dir.xml is-executable.xml is-file.xml is-link.xml
is-readable.xml is-writeable.xml lchgrp.xml lchown.xml link.xml linkinfo.xml lstat.xml mkdir.xml pclose.xml readlink.xml rename.xml rewind.xml
rmdir.xml set-file-buffer.xml stat.xml symlink.xml tmpfile.xml unlink.xml
| From: | Mehdi Achour | Date: | Sat, 16 Jun 2007 01:17:15 +0000 |
| Subject: | cvs: phpdoc /en/reference/filesystem/functions chgrp.xml chown.xml copy.xml delete.xml disk-free-space.xml disk-total-space.xml diskfreespace.xml fclose.xml feof.xml fflush.xml fgetcsv.xml fgets.xml file-exists.xml file-put-contents.xml file.xml filectime.xml filegroup.xml fileinode.xml filemtime.xml fileowner.xml fileperms.xml filesize.xml fopen.xml fputs.xml ftell.xml glob.xml is-dir.xml is-executable.xml is-file.xml is-link.xml is-readable.xml is-writeable.xml lchgrp.xml lchown.xml link.xml linkinfo.xml lstat.xml mkdir.xml pclose.xml readlink.xml rename.xml rewind.xml rmdir.xml set-file-buffer.xml stat.xml symlink.xml tmpfile.xml unlink.xml |
||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969376721@lists.php.net to get a copy of this message | ||
didou Sat Jun 16 01:17:15 2007 UTC
Modified files:
/phpdoc/en/reference/filesystem/functions chgrp.xml chown.xml
copy.xml delete.xml
disk-free-space.xml
disk-total-space.xml
diskfreespace.xml
fclose.xml feof.xml
fflush.xml fgetcsv.xml
fgets.xml file-exists.xml
file-put-contents.xml
file.xml filectime.xml
filegroup.xml
fileinode.xml
filemtime.xml
fileowner.xml
fileperms.xml
filesize.xml fopen.xml
fputs.xml ftell.xml
glob.xml is-dir.xml
is-executable.xml
is-file.xml is-link.xml
is-readable.xml
is-writeable.xml
lchgrp.xml lchown.xml
link.xml linkinfo.xml
lstat.xml mkdir.xml
pclose.xml readlink.xml
rename.xml rewind.xml
rmdir.xml
set-file-buffer.xml
stat.xml symlink.xml
tmpfile.xml unlink.xml
Log:
ref.filesystem: switch to new style
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/chgrp.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filesystem/functions/chgrp.xml diff -u phpdoc/en/reference/filesystem/functions/chgrp.xml:1.7 phpdoc/en/reference/filesystem/functions/chgrp.xml:1.8 --- phpdoc/en/reference/filesystem/functions/chgrp.xml:1.7 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/chgrp.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.chgrp"> <refnamediv> <refname>chgrp</refname> <refpurpose>Changes file group</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>chgrp</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -15,20 +15,61 @@ </methodsynopsis> <para> Attempts to change the group of the file <parameter>filename</parameter> - to <parameter>group</parameter> (specified by name or number). Only the - superuser may change the group of a file arbitrarily; other users may - change the group of a file to any group of which that user is a member. + to <parameter>group</parameter>. </para> <para> + Only the superuser may change the group of a file arbitrarily; other users + may change the group of a file to any group of which that user is a member. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>group</parameter></term> + <listitem> + <para> + A group name or number. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> &return.success; </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; ¬e.sm.uidcheck; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>chown</function> and - <function>chmod</function>. + <simplelist> + <member><function>chown</function></member> + <member><function>chmod</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/chown.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/filesystem/functions/chown.xml diff -u phpdoc/en/reference/filesystem/functions/chown.xml:1.8 phpdoc/en/reference/filesystem/functions/chown.xml:1.9 --- phpdoc/en/reference/filesystem/functions/chown.xml:1.8 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/chown.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.chown"> <refnamediv> <refname>chown</refname> <refpurpose>Changes file owner</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>chown</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -15,18 +15,57 @@ </methodsynopsis> <para> Attempts to change the owner of the file <parameter>filename</parameter> - to user <parameter>user</parameter> (specified by name or number). Only - the superuser may change the owner of a file. + to user <parameter>user</parameter>. Only the superuser may change the + owner of a file. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>user</parameter></term> + <listitem> + <para> + A user name or number. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; ¬e.sm.uidcheck; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>chmod</function>. + <simplelist> + <member><function>chmod</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/copy.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/reference/filesystem/functions/copy.xml diff -u phpdoc/en/reference/filesystem/functions/copy.xml:1.14 phpdoc/en/reference/filesystem/functions/copy.xml:1.15 --- phpdoc/en/reference/filesystem/functions/copy.xml:1.14 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/copy.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.15 $ --> <refentry id="function.copy"> <refnamediv> <refname>copy</refname> <refpurpose>Copies file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>copy</methodname> <methodparam><type>string</type><parameter>source</parameter></methodparam> @@ -15,7 +15,80 @@ </methodsynopsis> <para> Makes a copy of the file <parameter>source</parameter> to - <parameter>dest</parameter>. &return.success; + <parameter>dest</parameter>. + </para> + <para> + If you wish to move a file, use the <function>rename</function> function. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>source</parameter></term> + <listitem> + <para> + Path to the source file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>dest</parameter></term> + <listitem> + <para> + The destination path. If <parameter>dest</parameter> is a URL, the + copy operation may fail if the wrapper does not support overwriting of + existing files. + </para> + <warning> + <para> + If the destination file already exists, it will be overwritten. + </para> + </warning> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.3.0</entry> + <entry> + Both <parameter>source</parameter> and <parameter>dest</parameter> + may now be URLs if the "fopen wrappers" have been enabled. + See <function>fopen</function> for more details. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> <example> <title><function>copy</function> example</title> <programlisting role="php"> @@ -32,37 +105,31 @@ </programlisting> </example> </para> - <para> - If you wish to move a file, use the <function>rename</function> function. - </para> - <note> - <para> - As of PHP 4.3.0, both <parameter>source</parameter> and - <parameter>dest</parameter> may be URLs if the "fopen wrappers" - have been enabled. See <function>fopen</function> for more details. - If <parameter>dest</parameter> is a URL, the copy operation may - fail if the wrapper does not support overwriting of existing files. - </para> - </note> - <warning> - <para> - If the destination file already exists, it will be overwritten. - </para> - </warning> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <note> <para> Windows compatibility: If you copy a file with no size, - <function>copy</function> will return &false;, but the file will be correctly - copied. + <function>copy</function> will return &false;, but the file will be + correctly copied. </para> </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>move_uploaded_file</function>, - <function>rename</function>, and the section of the manual - about <link linkend="features.file-upload">handling file - uploads</link>. + <simplelist> + <member><function>move_uploaded_file</function></member> + <member><function>rename</function></member> + <member>The section of the manual about <link + linkend="features.file-upload">handling file uploads</link></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/delete.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/filesystem/functions/delete.xml diff -u phpdoc/en/reference/filesystem/functions/delete.xml:1.5 phpdoc/en/reference/filesystem/functions/delete.xml:1.6 --- phpdoc/en/reference/filesystem/functions/delete.xml:1.5 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/delete.xml Sat Jun 16 01:17:14 2007 @@ -1,27 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.delete"> <refnamediv> <refname>delete</refname> <refpurpose>See <function>unlink</function> or <function>unset</function></refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>void</type><methodname>delete</methodname> - <methodparam><type>string</type><parameter>file</parameter></methodparam> + <void/> </methodsynopsis> <para> - This is a dummy manual entry to satisfy those people who are - looking for <function>unlink</function> or - <function>unset</function> in the wrong place. + This is a dummy manual entry to satisfy those people who are looking for + <function>unlink</function> or <function>unset</function> in the wrong + place. </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - See also <function>unlink</function> to delete files, - <function>unset</function> to delete variables. + &return.void; </para> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>unlink</function> to delete files</member> + <member><function>unset</function> to delete variables</member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/disk-free-space.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/filesystem/functions/disk-free-space.xml diff -u phpdoc/en/reference/filesystem/functions/disk-free-space.xml:1.5 phpdoc/en/reference/filesystem/functions/disk-free-space.xml:1.6 --- phpdoc/en/reference/filesystem/functions/disk-free-space.xml:1.5 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/disk-free-space.xml Sat Jun 16 01:17:14 2007 @@ -1,22 +1,49 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.86 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.disk-free-space"> <refnamediv> <refname>disk_free_space</refname> <refpurpose>Returns available space in directory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>float</type><methodname>disk_free_space</methodname> <methodparam><type>string</type><parameter>directory</parameter></methodparam> </methodsynopsis> <para> - Given a string containing a directory, this function will return - the number of bytes available on the corresponding filesystem or - disk partition. + Given a string containing a directory, this function will return the + number of bytes available on the corresponding filesystem or disk + partition. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>directory</parameter></term> + <listitem> + <para> + A directory of the filesystem or disk partition. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the number of available bytes as a float. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>disk_free_space</function> example</title> @@ -34,13 +61,22 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; + </refsect1> - <simpara> - See also <function>disk_total_space</function> - </simpara> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>disk_total_space</function></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/disk-total-space.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/filesystem/functions/disk-total-space.xml diff -u phpdoc/en/reference/filesystem/functions/disk-total-space.xml:1.5 phpdoc/en/reference/filesystem/functions/disk-total-space.xml:1.6 --- phpdoc/en/reference/filesystem/functions/disk-total-space.xml:1.5 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/disk-total-space.xml Sat Jun 16 01:17:14 2007 @@ -1,22 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.64 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.disk-total-space"> <refnamediv> <refname>disk_total_space</refname> <refpurpose>Returns the total size of a directory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>float</type><methodname>disk_total_space</methodname> <methodparam><type>string</type><parameter>directory</parameter></methodparam> </methodsynopsis> <para> - Given a string containing a directory, this function will return - the total number of bytes on the corresponding filesystem or disk - partition. + Given a string containing a directory, this function will return the total + number of bytes on the corresponding filesystem or disk partition. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>directory</parameter></term> + <listitem> + <para> + A directory of the filesystem or disk partition. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the total number of bytes as a float. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>disk_total_space</function> example</title> @@ -34,13 +60,22 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; + </refsect1> - <simpara> - See also <function>disk_free_space</function> - </simpara> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>disk_free_space</function></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/diskfreespace.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/filesystem/functions/diskfreespace.xml diff -u phpdoc/en/reference/filesystem/functions/diskfreespace.xml:1.5 phpdoc/en/reference/filesystem/functions/diskfreespace.xml:1.6 --- phpdoc/en/reference/filesystem/functions/diskfreespace.xml:1.5 Mon Apr 25 16:17:01 2005 +++ phpdoc/en/reference/filesystem/functions/diskfreespace.xml Sat Jun 16 01:17:14 2007 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.diskfreespace"> <refnamediv> <refname>diskfreespace</refname> @@ -14,6 +13,7 @@ <function>disk_free_space</function>. </simpara> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fclose.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fclose.xml diff -u phpdoc/en/reference/filesystem/functions/fclose.xml:1.6 phpdoc/en/reference/filesystem/functions/fclose.xml:1.7 --- phpdoc/en/reference/filesystem/functions/fclose.xml:1.6 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fclose.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.fclose"> <refnamediv> <refname>fclose</refname> <refpurpose>Closes an open file pointer</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>fclose</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> @@ -15,14 +15,34 @@ <para> The file pointed to by <parameter>handle</parameter> is closed. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - &return.success; + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <para> + The file pointer must be valid, and must point to a file successfully + opened by <function>fopen</function> or <function>fsockopen</function>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - The file pointer must be valid, and must point to a file - successfully opened by <function>fopen</function> or - <function>fsockopen</function>. + &return.success; </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>A simple <function>fclose</function> example</title> @@ -30,9 +50,9 @@ <![CDATA[ <?php - $handle = fopen('somefile.txt', 'r'); +$handle = fopen('somefile.txt', 'r'); - fclose($handle); +fclose($handle); ?> ]]> @@ -40,6 +60,17 @@ </example> </para> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>fopen</function></member> + <member><function>fsockopen</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/feof.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/reference/filesystem/functions/feof.xml diff -u phpdoc/en/reference/filesystem/functions/feof.xml:1.14 phpdoc/en/reference/filesystem/functions/feof.xml:1.15 --- phpdoc/en/reference/filesystem/functions/feof.xml:1.14 Fri Jun 15 19:45:56 2007 +++ phpdoc/en/reference/filesystem/functions/feof.xml Sat Jun 16 01:17:14 2007 @@ -1,21 +1,46 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.15 $ --> <refentry id="function.feof"> <refnamediv> <refname>feof</refname> <refpurpose>Tests for end-of-file on a file pointer</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>feof</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> + Tests for end-of-file on a file pointer. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + &fs.validfp.all; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns &true; if the file pointer is at EOF or an error occurs (including socket timeout); otherwise returns &false;. </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <warning> <simpara> If a connection opened by <function>fsockopen</function> wasn't closed @@ -25,7 +50,6 @@ value. </simpara> </warning> - &fs.validfp.all; <warning> <para> If passed file pointer is not valid you may get an infinite loop, because @@ -50,6 +74,7 @@ </para> </warning> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fflush.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fflush.xml diff -u phpdoc/en/reference/filesystem/functions/fflush.xml:1.7 phpdoc/en/reference/filesystem/functions/fflush.xml:1.8 --- phpdoc/en/reference/filesystem/functions/fflush.xml:1.7 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fflush.xml Sat Jun 16 01:17:14 2007 @@ -1,24 +1,44 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.43 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.fflush"> <refnamediv> <refname>fflush</refname> <refpurpose>Flushes the output to a file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>fflush</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> - This function forces a write of all buffered output to the - resource pointed to by the file handle <parameter>handle</parameter>. + This function forces a write of all buffered output to the resource + pointed to by the file <parameter>handle</parameter>. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + &fs.validfp.all; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> &return.success; </para> - &fs.validfp.all; </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fgetcsv.xml?r1=1.21&r2=1.22&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.21 phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.22 --- phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.21 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fgetcsv.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.22 $ --> <refentry id="function.fgetcsv"> <refnamediv> <refname>fgetcsv</refname> <refpurpose>Gets line from file pointer and parse for CSV fields</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>fgetcsv</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> @@ -15,65 +15,112 @@ <methodparam choice="opt"><type>string</type><parameter>delimiter</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>enclosure</parameter></methodparam> </methodsynopsis> + <para> + Similar to <function>fgets</function> except that + <function>fgetcsv</function> parses the line it reads for fields in + <acronym>CSV</acronym> format and returns an array containing the fields + read. + </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>handle</parameter></term> <listitem> - <simpara> - A valid file pointer to a file successfully opened by <function>fopen</function>, - <function>popen</function>, or <function>fsockopen</function>. - </simpara> + <para> + A valid file pointer to a file successfully opened by + <function>fopen</function>, <function>popen</function>, or + <function>fsockopen</function>. + </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>length</parameter> (Optional)</term> + <term><parameter>length</parameter></term> <listitem> - <simpara> - Must be greater than the longest line (in characters) to be found in the CSV file - (allowing for trailing line-end characters). It became optional in PHP 5. Omitting - this parameter (or setting it to 0 in PHP 5.0.4 and later) the maximum line length - is not limited, which is slightly slower. - </simpara> + <para> + Must be greater than the longest line (in characters) to be found in + the CSV file (allowing for trailing line-end characters). It became + optional in PHP 5. Omitting this parameter (or setting it to 0 in PHP + 5.0.4 and later) the maximum line length is not limited, which is + slightly slower. + </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>delimiter</parameter> (Optional)</term> + <term><parameter>delimiter</parameter></term> <listitem> - <simpara> + <para> Set the field delimiter (one character only). Defaults as a comma. - </simpara> + </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>enclosure</parameter> (Optional)</term> + <term><parameter>enclosure</parameter></term> <listitem> - <simpara> - Set the field enclosure character (one character only). Defaults as a double quotation mark. Added in PHP 4.3.0. - </simpara> + <para> + Set the field enclosure character (one character only). Defaults as a + double quotation mark. + </para> </listitem> </varlistentry> </variablelist> </para> + </refsect1> - <simpara> - Similar to <function>fgets</function> except that - <function>fgetcsv</function> parses the line it reads for fields - in <acronym>CSV</acronym> format and returns an array containing - the fields read. - </simpara> - <simpara> - <function>fgetcsv</function> returns &false; on error, including - end of file. - </simpara> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns an indexed array containing the fields read. + </para> <note> - <simpara> + <para> A blank line in a CSV file will be returned as an array comprising a single <type>null</type> field, and will not be treated as an error. - </simpara> + </para> </note> + ¬e.line-endings; + <para> + <function>fgetcsv</function> returns &false; on error, including end of + file. + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.3.5</entry> + <entry> + <function>fgetcsv</function> is now binary safe + </entry> + </row> + <row> + <entry>4.3.0</entry> + <entry> + The <parameter>enclosure</parameter> parameter was added + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Read and print the entire contents of a CSV file</title> @@ -96,22 +143,31 @@ </programlisting> </example> </para> - <para> - <function>fgetcsv</function> has been binary safe since PHP 4.3.5 - </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <note> - <simpara> + <para> Locale setting is taken into account by this function. If <varname>LANG</varname> is e.g. <literal>en_US.UTF-8</literal>, files in one-byte encoding are read wrong by this function. - </simpara> + </para> </note> - ¬e.line-endings; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>explode</function>, <function>file</function>, - <function>pack</function> and <function>fputcsv</function>. + <simplelist> + <member><function>explode</function></member> + <member><function>file</function></member> + <member><function>pack</function></member> + <member><function>fputcsv</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fgets.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fgets.xml diff -u phpdoc/en/reference/filesystem/functions/fgets.xml:1.17 phpdoc/en/reference/filesystem/functions/fgets.xml:1.18 --- phpdoc/en/reference/filesystem/functions/fgets.xml:1.17 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fgets.xml Sat Jun 16 01:17:14 2007 @@ -1,41 +1,100 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.18 $ --> <refentry id="function.fgets"> <refnamediv> <refname>fgets</refname> <refpurpose>Gets line from file pointer</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>fgets</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> + Gets a line from file pointer. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + &fs.validfp.all; + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>length</parameter></term> + <listitem> + <para> + Reading ends when <parameter>length</parameter> - 1 bytes have been + read, on a newline (which is included in the return value), or on EOF + (whichever comes first). If no length is specified, it will keep + reading from the stream until it reaches the end of the line. + </para> + <note> + <para> + Until PHP 4.3.0, omitting it would assume 1024 as the line length. + If the majority of the lines in the file are all larger than 8KB, + it is more resource efficient for your script to specify the maximum + line length. + </para> + </note> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns a string of up to <parameter>length</parameter> - 1 bytes read from - the file pointed to by <parameter>handle</parameter>. Reading ends when - <parameter>length</parameter> - 1 bytes have been read, on a newline (which is - included in the return value), or on EOF (whichever comes first). If no length - is specified, it will keep reading from the stream until it reaches - the end of the line. + the file pointed to by <parameter>handle</parameter>. </para> <para> If an error occurs, returns &false;. </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; <para> - Common Pitfalls: + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.3.0</entry> + <entry> + <function>fgets</function> is now binary safe + </entry> + </row> + <row> + <entry>4.2.0</entry> + <entry> + The <parameter>length</parameter> parameter became optional + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> - <simpara> - People used to the 'C' semantics of <function>fgets</function> - should note the difference in how <literal>EOF</literal> is returned. - </simpara> - - &fs.validfp.all; + </refsect1> + <refsect1 role="examples"> + &reftitle.examples; <para> - A simple example follows: <example> <title>Reading a file line by line</title> <programlisting role="php"> @@ -54,33 +113,35 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + ¬e.line-endings; <note> - <simpara> - The <parameter>length</parameter> parameter became optional in PHP - 4.2.0. Until PHP 4.3.0, omitting it would assume 1024 as the line length. - If the majority of the lines in the file are all larger than 8KB, - it is more resource efficient for your script to specify the maximum - line length. - </simpara> - </note> - <note> - <simpara> - This function is binary safe as of PHP 4.3. Earlier versions - were not binary safe. - </simpara> + <para> + People used to the 'C' semantics of <function>fgets</function> + should note the difference in how <literal>EOF</literal> is returned. + </para> </note> - ¬e.line-endings; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>fgetss</function> - <function>fread</function>, - <function>fgetc</function>, - <function>stream_get_line</function>, - <function>fopen</function>, - <function>popen</function>, - <function>fsockopen</function>, and - <function>stream_set_timeout</function>. + <simplelist> + <member><function>fgetss</function></member> + <member><function>fread</function></member> + <member><function>fgetc</function></member> + <member><function>stream_get_line</function></member> + <member><function>fopen</function></member> + <member><function>popen</function></member> + <member><function>fsockopen</function></member> + <member><function>stream_set_timeout</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/file-exists.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc/en/reference/filesystem/functions/file-exists.xml diff -u phpdoc/en/reference/filesystem/functions/file-exists.xml:1.17 phpdoc/en/reference/filesystem/functions/file-exists.xml:1.18 --- phpdoc/en/reference/filesystem/functions/file-exists.xml:1.17 Fri Jun 15 19:45:56 2007 +++ phpdoc/en/reference/filesystem/functions/file-exists.xml Sat Jun 16 01:17:14 2007 @@ -1,26 +1,67 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.18 $ --> <refentry id="function.file-exists"> <refnamediv> <refname>file_exists</refname> <refpurpose>Checks whether a file or directory exists</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>file_exists</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> - <simpara> + <para> + Checks whether a file or directory exists. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file or directory. + </para> + <para> + On windows, use <filename>//computername/share/filename</filename> or + <filename>\\computername\share\filename</filename> to check files on + network shares. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns &true; if the file or directory specified by <parameter>filename</parameter> exists; &false; otherwise. - </simpara> - <para> - On windows, use <filename>//computername/share/filename</filename> or - <filename>\\computername\share\filename</filename> to check files on - network shares. </para> + <warning> + <para> + This function returns &false; for files inaccessible due to <link + linkend="features.safe-mode">safe mode</link> restrictions. However these + files still can be <link linkend="function.include">included</link> if + they are located in <link + linkend="ini.safe-mode-include-dir">safe_mode_include_dir</link>. + </para> + </warning> + <note> + <para> + The check is done using the real UID/GID instead of the effective one. + </para> + </note> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Testing whether a file exists</title> @@ -39,32 +80,26 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.clearstatcache; - &tip.fopen-wrapper.stat; + </refsect1> - <warning> - <para> - This function returns &false; for files inaccessible due to <link - linkend="features.safe-mode">safe mode</link> restrictions. However these - files still can be <link linkend="function.include">included</link> if - they are located in <link - linkend="ini.safe-mode-include-dir">safe_mode_include_dir</link>. - </para> - </warning> - - <note> - <para> - The check is done using the real UID/GID instead of the effective one. - </para> - </note> - + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>is_readable</function>, <function>is_writable</function>, - <function>is_file</function> and <function>file</function>. + <simplelist> + <member><function>is_readable</function></member> + <member><function>is_writable</function></member> + <member><function>is_file</function></member> + <member><function>file</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/file-put-contents.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc/en/reference/filesystem/functions/file-put-contents.xml diff -u phpdoc/en/reference/filesystem/functions/file-put-contents.xml:1.13 phpdoc/en/reference/filesystem/functions/file-put-contents.xml:1.14 --- phpdoc/en/reference/filesystem/functions/file-put-contents.xml:1.13 Fri Jun 15 19:45:56 2007 +++ phpdoc/en/reference/filesystem/functions/file-put-contents.xml Sat Jun 16 01:17:14 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <refentry id="function.file-put-contents"> <refnamediv> <refname>file_put_contents</refname> @@ -15,21 +15,15 @@ <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam> </methodsynopsis> - <simpara> + <para> Identical to calling <function>fopen</function>, <function>fwrite</function>, and <function>fclose</function> successively. - </simpara> + </para> <para> You can also specify the <parameter>data</parameter> parameter as an array (not multi-dimension arrays). This is equivalent to <literal>file_put_contents($filename, implode('', $array))</literal>. </para> - <para> - As of PHP 5.1.0, you may also pass a stream resource to the - <parameter>data</parameter> parameter. In result, the remaining buffer of - that stream will be copied to the specified file. This is similar with - using <function>stream_copy_to_stream</function>. - </para> </refsect1> <refsect1 role="parameters"> @@ -51,6 +45,11 @@ The data to write. Can be either a <type>string</type>, an <type>array</type> or a <type>stream</type> resource (explained above). </para> + <para> + If <parameter>data</parameter> is a <type>stream</type> resource, the + remaining buffer of that stream will be copied to the specified file. + This is similar with using <function>stream_copy_to_stream</function>. + </para> </listitem> </varlistentry> <varlistentry> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/file.xml?r1=1.21&r2=1.22&diff_format=u Index: phpdoc/en/reference/filesystem/functions/file.xml diff -u phpdoc/en/reference/filesystem/functions/file.xml:1.21 phpdoc/en/reference/filesystem/functions/file.xml:1.22 --- phpdoc/en/reference/filesystem/functions/file.xml:1.21 Tue Apr 3 20:38:29 2007 +++ phpdoc/en/reference/filesystem/functions/file.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.22 $ --> <refentry id="function.file"> <refnamediv> <refname>file</refname> <refpurpose>Reads entire file into an array</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>file</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -15,57 +15,144 @@ <methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam> </methodsynopsis> <para> - Similiar to <function>file_get_contents</function>, except that - <function>file</function> returns the file in an array. Each - element of the array corresponds to a line in the file, with the - newline still attached. Upon failure, <function>file</function> - returns &false;. + Reads an entire file into an array. </para> + <note> + <para> + You can use <function>file_get_contents</function> to return the contents + of a file as a string. + </para> + </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - The optional parameter <parameter>flags</parameter> can be one, or more, of - the following constants: <variablelist> <varlistentry> - <term> - <constant>FILE_USE_INCLUDE_PATH</constant> - </term> + <term><parameter>filename</parameter></term> <listitem> - <simpara> - Search for the file in the <link linkend="ini.include-path">include_path</link>. - </simpara> + <para> + Path to the file. + </para> + &tip.fopen-wrapper; </listitem> </varlistentry> <varlistentry> - <term> - <constant>FILE_IGNORE_NEW_LINES</constant> - </term> + <term><parameter>flags</parameter></term> <listitem> - <simpara> - Do not add newline at the end of each array element - </simpara> + <para> + The optional parameter <parameter>flags</parameter> can be one, or + more, of the following constants: + <variablelist> + <varlistentry> + <term> + <constant>FILE_USE_INCLUDE_PATH</constant> + </term> + <listitem> + <simpara> + Search for the file in the <link + linkend="ini.include-path">include_path</link>. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term> + <constant>FILE_IGNORE_NEW_LINES</constant> + </term> + <listitem> + <simpara> + Do not add newline at the end of each array element + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term> + <constant>FILE_SKIP_EMPTY_LINES</constant> + </term> + <listitem> + <simpara> + Skip empty lines + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> </listitem> </varlistentry> <varlistentry> - <term> - <constant>FILE_SKIP_EMPTY_LINES</constant> - </term> + <term><parameter>context</parameter></term> <listitem> - <simpara> - Skip empty lines - </simpara> + <para> + ¬e.context-support; + </para> </listitem> </varlistentry> </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the file in an array. Each element of the array corresponds to a + line in the file, with the newline still attached. Upon failure, + <function>file</function> returns &false;. + </para> <note> <para> - Prior to PHP 5.0.0 the <parameter>flags</parameter> parameter only - covered <link linkend="ini.include-path">include_path</link> and was - enabled with 1. + Each line in the resulting array will include the line ending, unless + <constant>FILE_IGNORE_NEW_LINES</constant> is used, so you still need to + use <function>rtrim</function> if you do not want the line ending + present. </para> </note> + ¬e.line-endings; + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + The <parameter>context</parameter> parameter was added + </entry> + </row> + <row> + <entry>5.0.0</entry> + <entry> + Prior to PHP 5.0.0 the <parameter>flags</parameter> parameter only + covered <link linkend="ini.include-path">include_path</link> and was + enabled with 1 + </entry> + </row> + <row> + <entry>4.3.0</entry> + <entry> + <function>file</function> became binary safe + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> - <informalexample> + <example> + <title><function>file</function> example</title> <programlisting role="php"> <![CDATA[ <?php @@ -83,36 +170,30 @@ ?> ]]> </programlisting> - </informalexample> + </example> </para> - &tip.fopen-wrapper; - <note> - <para> - Each line in the resulting array will include the line ending, unless FILE_IGNORE_NEW_LINES is used, so you - still need to use <function>rtrim</function> if you do not want the line - ending present. - </para> - </note> - ¬e.line-endings; - <note> - <para> - As of PHP 4.3.0 you can use <function>file_get_contents</function> to - return the contents of a file as a string. - </para> - <para> - In PHP 4.3.0 <function>file</function> became binary safe. - </para> - </note> - ¬e.context-support; + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; &warn.ssl-non-standard; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>readfile</function>, - <function>fopen</function>, <function>fsockopen</function>, - <function>popen</function>, <function>file_get_contents</function>, - <function>include</function>, and - <function>stream_context_create</function> + <simplelist> + <member><function>readfile</function></member> + <member><function>fopen</function></member> + <member><function>fsockopen</function></member> + <member><function>popen</function></member> + <member><function>file_get_contents</function></member> + <member><function>include</function></member> + <member><function>stream_context_create</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/filectime.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/filesystem/functions/filectime.xml diff -u phpdoc/en/reference/filesystem/functions/filectime.xml:1.9 phpdoc/en/reference/filesystem/functions/filectime.xml:1.10 --- phpdoc/en/reference/filesystem/functions/filectime.xml:1.9 Fri Jun 15 19:45:56 2007 +++ phpdoc/en/reference/filesystem/functions/filectime.xml Sat Jun 16 01:17:14 2007 @@ -1,40 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.filectime"> <refnamediv> <refname>filectime</refname> <refpurpose>Gets inode change time of file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>filectime</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns the time the file was last changed, or &false; in case of - an error. The time is returned as a Unix timestamp. + Gets the inode change time of a file. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - Note: In most Unix filesystems, a file is considered - changed when its inode data is changed; that is, when - the permissions, owner, group, or other metadata - from the inode is updated. See also - <function>filemtime</function> (which is what you want to use - when you want to create "Last Modified" footers on web pages) and - <function>fileatime</function>. + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - Note also that in some Unix texts the ctime of a file is - referred to as being the creation time of the file. This is wrong. - There is no creation time for Unix files in most Unix filesystems. + Returns the time the file was last changed, or &false; in case of + an error. The time is returned as a Unix timestamp. </para> + </refsect1> - ¬e.clearstatcache; - - &tip.fopen-wrapper.stat; - + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>A <function>filectime</function> example</title> @@ -54,10 +62,40 @@ </programlisting> </example> </para> - <simpara> - See also <function>filemtime</function> - </simpara> </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + Note: In most Unix filesystems, a file is considered changed when its + inode data is changed; that is, when the permissions, owner, group, or + other metadata from the inode is updated. See also + <function>filemtime</function> (which is what you want to use when you + want to create "Last Modified" footers on web pages) and + <function>fileatime</function>. + </para> + </note> + <note> + <para> + Note also that in some Unix texts the ctime of a file is referred to as + being the creation time of the file. This is wrong. There is no creation + time for Unix files in most Unix filesystems. + </para> + </note> + ¬e.clearstatcache; + &tip.fopen-wrapper.stat; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>filemtime</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/filegroup.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filesystem/functions/filegroup.xml diff -u phpdoc/en/reference/filesystem/functions/filegroup.xml:1.7 phpdoc/en/reference/filesystem/functions/filegroup.xml:1.8 --- phpdoc/en/reference/filesystem/functions/filegroup.xml:1.7 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/filegroup.xml Sat Jun 16 01:17:14 2007 @@ -1,34 +1,72 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.filegroup"> <refnamediv> <refname>filegroup</refname> <refpurpose>Gets file group</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>filegroup</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> + Gets the file group. The group ID is returned in numerical format, use + <function>posix_getgrgid</function> to resolve it to a group name. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns the group ID of the file, or &false; in case of an error. The group ID is returned in numerical format, use <function>posix_getgrgid</function> to resolve it to a group name. - Upon failure, &false; is returned along with an error of level - <constant>E_WARNING</constant>. + Upon failure, &false; is returned. </para> + </refsect1> - ¬e.clearstatcache; + <refsect1 role="errors"> + &reftitle.errors; + <para> + Upon failure, an <constant>E_WARNING</constant> is emitted. + </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; &tip.fopen-wrapper.stat; + </refsect1> - <simpara> - See also <function>fileowner</function>, and - <link linkend="ini.safe-mode-gid">safe_mode_gid</link>. - </simpara> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>fileowner</function></member> + <member><link linkend="ini.safe-mode-gid">safe_mode_gid</link></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fileinode.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fileinode.xml diff -u phpdoc/en/reference/filesystem/functions/fileinode.xml:1.6 phpdoc/en/reference/filesystem/functions/fileinode.xml:1.7 --- phpdoc/en/reference/filesystem/functions/fileinode.xml:1.6 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fileinode.xml Sat Jun 16 01:17:14 2007 @@ -1,30 +1,60 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.fileinode"> <refnamediv> <refname>fileinode</refname> <refpurpose>Gets file inode</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>fileinode</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns the inode number of the file, or &false; in case of an - error. + Gets the file inode. </para> + </refsect1> - ¬e.clearstatcache; + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the inode number of the file, or &false; in case of an error. + </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; &tip.fopen-wrapper.stat; + </refsect1> - <simpara> - See also <function>stat</function> - </simpara> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>stat</function></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/filemtime.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filesystem/functions/filemtime.xml diff -u phpdoc/en/reference/filesystem/functions/filemtime.xml:1.6 phpdoc/en/reference/filesystem/functions/filemtime.xml:1.7 --- phpdoc/en/reference/filesystem/functions/filemtime.xml:1.6 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/filemtime.xml Sat Jun 16 01:17:14 2007 @@ -1,32 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.filemtime"> <refnamediv> <refname>filemtime</refname> <refpurpose>Gets file modification time</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>filemtime</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns the time the file was last modified, or &false; in case of - an error. The time is returned as a Unix timestamp, which is - suitable for the <function>date</function> function. + This function returns the time when the data blocks of a file were being + written to, that is, the time when the content of the file was changed. </para> + </refsect1> - ¬e.clearstatcache; - - &tip.fopen-wrapper.stat; + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - This function returns the time when the data - blocks of a file were being written to, that is, the time - when the content of the file was changed. + Returns the time the file was last modified, or &false; in case of + an error. The time is returned as a Unix timestamp, which is + suitable for the <function>date</function> function. </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>filemtime</function> example</title> @@ -44,11 +62,26 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; + &tip.fopen-wrapper.stat; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>filectime</function>, <function>stat</function>, - <function>touch</function>, and <function>getlastmod</function>. + <simplelist> + <member><function>filectime</function></member> + <member><function>stat</function></member> + <member><function>touch</function></member> + <member><function>getlastmod</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fileowner.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fileowner.xml diff -u phpdoc/en/reference/filesystem/functions/fileowner.xml:1.6 phpdoc/en/reference/filesystem/functions/fileowner.xml:1.7 --- phpdoc/en/reference/filesystem/functions/fileowner.xml:1.6 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fileowner.xml Sat Jun 16 01:17:14 2007 @@ -1,32 +1,62 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.fileowner"> <refnamediv> <refname>fileowner</refname> <refpurpose>Gets file owner</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>fileowner</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> + Gets the file owner. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns the user ID of the owner of the file, or &false; in case of an error. The user ID is returned in numerical format, use <function>posix_getpwuid</function> to resolve it to a username. </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.clearstatcache; - &tip.fopen-wrapper.stat; + </refsect1> - <simpara> - See also <function>stat</function> - </simpara> - + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>stat</function></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fileperms.xml?r1=1.11&r2=1.12&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fileperms.xml diff -u phpdoc/en/reference/filesystem/functions/fileperms.xml:1.11 phpdoc/en/reference/filesystem/functions/fileperms.xml:1.12 --- phpdoc/en/reference/filesystem/functions/fileperms.xml:1.11 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fileperms.xml Sat Jun 16 01:17:14 2007 @@ -1,45 +1,69 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.12 $ --> <refentry id="function.fileperms"> <refnamediv> <refname>fileperms</refname> <refpurpose>Gets file permissions</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>fileperms</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> + Gets permissions for the given file. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns the permissions on the file, or &false; in case of an error. </para> - ¬e.clearstatcache; - &tip.fopen-wrapper.stat; - <example> - <title>Display permissions as an octal value</title> - <programlisting role="php"> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Display permissions as an octal value</title> + <programlisting role="php"> <![CDATA[ <?php echo substr(sprintf('%o', fileperms('/tmp')), -4); echo substr(sprintf('%o', fileperms('/etc/passwd')), -4); ?> ]]> - </programlisting> - <para> - This would produce the output: - </para> - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ 1777 0644 ]]> - </screen> - </example> - <example> - <title>Display full permissions</title> - <programlisting role="php"> + </screen> + </example> + <example> + <title>Display full permissions</title> + <programlisting role="php"> <![CDATA[ <?php $perms = fileperms('/etc/passwd'); @@ -94,21 +118,33 @@ echo $info; ?> ]]> - </programlisting> - <para> - This would produce the output: - </para> - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ -rw-r--r-- ]]> - </screen> - </example> - <simpara> - See also <function>is_readable</function>, - and <function>stat</function> - </simpara> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; + &tip.fopen-wrapper.stat; </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>is_readable</function></member> + <member><function>stat</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/filesize.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/filesystem/functions/filesize.xml diff -u phpdoc/en/reference/filesystem/functions/filesize.xml:1.8 phpdoc/en/reference/filesystem/functions/filesize.xml:1.9 --- phpdoc/en/reference/filesystem/functions/filesize.xml:1.8 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/filesize.xml Sat Jun 16 01:17:14 2007 @@ -1,18 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.filesize"> <refnamediv> <refname>filesize</refname> <refpurpose>Gets file size</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>filesize</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> + Gets the size for the given file. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns the size of the file in bytes, or &false; (and generates an error of level <constant>E_WARNING</constant>) in case of an error. </para> @@ -24,11 +47,10 @@ be overcome by using <literal>sprintf("%u", filesize($file))</literal>. </simpara> </note> + </refsect1> - ¬e.clearstatcache; - - &tip.fopen-wrapper.stat; - + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>filesize</function> example</title> @@ -46,10 +68,23 @@ </programlisting> </example> </para> - <simpara> - See also <function>file_exists</function> - </simpara> </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; + &tip.fopen-wrapper.stat; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>file_exists</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fopen.xml?r1=1.30&r2=1.31&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fopen.xml diff -u phpdoc/en/reference/filesystem/functions/fopen.xml:1.30 phpdoc/en/reference/filesystem/functions/fopen.xml:1.31 --- phpdoc/en/reference/filesystem/functions/fopen.xml:1.30 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fopen.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.30 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.31 $ --> <refentry id="function.fopen"> <refnamediv> <refname>fopen</refname> <refpurpose>Opens file or URL</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>fopen</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -15,209 +15,291 @@ <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam> </methodsynopsis> - <simpara> - <function>fopen</function> binds a named resource, specified - by <parameter>filename</parameter>, to a stream. If - <parameter>filename</parameter> is of the form "scheme://...", - it is assumed to be a URL and PHP will search for a protocol - handler (also known as a wrapper) for that scheme. If no - wrappers for that protocol are registered, PHP will emit - a notice to help you track potential problems in your script - and then continue as though <parameter>filename</parameter> - specifies a regular file. - </simpara> - <simpara> - If PHP has decided that <parameter>filename</parameter> specifies - a local file, then it will try to open a stream on that file. - The file must be accessible to PHP, so you need to ensure that - the file access permissions allow this access. - If you have enabled &safemode;, - or <link linkend="ini.open-basedir">open_basedir</link> further - restrictions may apply. - </simpara> - <simpara> - If PHP has decided that <parameter>filename</parameter> specifies - a registered protocol, and that protocol is registered as a - network URL, PHP will check to make sure that - <link linkend="ini.allow-url-fopen">allow_url_fopen</link> is - enabled. If it is switched off, PHP will emit a warning and - the fopen call will fail. - </simpara> - <note> - <simpara> - The list of supported protocols can be found in <xref linkend="wrappers"/>. - Some protocols (also referred to as <literal>wrappers</literal>) support - <literal>context</literal> and/or &php.ini; options. - Refer to the specific page for the protocol in use for a list of options - which can be set. (e.g. &php.ini; value - <literal>user_agent</literal> used by the <literal>http</literal> wrapper). - </simpara> - </note> - ¬e.context-support; - <note> - <simpara> - As of PHP 4.3.2, the default mode is set to binary for all - platforms that distinguish between binary and text mode. If you are - having problems with your scripts after upgrading, try using the - <literal>'t'</literal> flag as a workaround until you have made your - script more portable as mentioned below. - </simpara> - </note> <para> - The <parameter>mode</parameter> parameter specifies the type of access - you require to the stream. It may be any of the following: - <table> - <title> - A list of possible modes for <function>fopen</function> - using <parameter>mode</parameter> - </title> + <function>fopen</function> binds a named resource, specified by + <parameter>filename</parameter>, to a stream. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + If <parameter>filename</parameter> is of the form "scheme://...", it + is assumed to be a URL and PHP will search for a protocol handler + (also known as a wrapper) for that scheme. If no wrappers for that + protocol are registered, PHP will emit a notice to help you track + potential problems in your script and then continue as though + <parameter>filename</parameter> specifies a regular file. + </para> + <para> + If PHP has decided that <parameter>filename</parameter> specifies + a local file, then it will try to open a stream on that file. + The file must be accessible to PHP, so you need to ensure that + the file access permissions allow this access. + If you have enabled &safemode;, + or <link linkend="ini.open-basedir">open_basedir</link> further + restrictions may apply. + </para> + <para> + If PHP has decided that <parameter>filename</parameter> specifies + a registered protocol, and that protocol is registered as a + network URL, PHP will check to make sure that + <link linkend="ini.allow-url-fopen">allow_url_fopen</link> is + enabled. If it is switched off, PHP will emit a warning and + the fopen call will fail. + </para> + <note> + <para> + The list of supported protocols can be found in <xref + linkend="wrappers"/>. Some protocols (also referred to as + <literal>wrappers</literal>) support <literal>context</literal> + and/or &php.ini; options. Refer to the specific page for the + protocol in use for a list of options which can be set. (e.g. + &php.ini; value <literal>user_agent</literal> used by the + <literal>http</literal> wrapper). + </para> + </note> + <para> + On the Windows platform, be careful to escape any backslashes + used in the path to the file, or use forward slashes. + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +$handle = fopen("c:\\data\\info.txt", "r"); +?> +]]> + </programlisting> + </informalexample> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>mode</parameter></term> + <listitem> + <para> + The <parameter>mode</parameter> parameter specifies the type of access + you require to the stream. It may be any of the following: + <table> + <title> + A list of possible modes for <function>fopen</function> + using <parameter>mode</parameter> + </title> + <tgroup cols="2"> + <thead> + <row> + <entry><parameter>mode</parameter></entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>'r'</literal></entry> + <entry> + Open for reading only; place the file pointer at the + beginning of the file. + </entry> + </row> + <row> + <entry><literal>'r+'</literal></entry> + <entry> + Open for reading and writing; place the file pointer at + the beginning of the file. + </entry> + </row> + <row> + <entry><literal>'w'</literal></entry> + <entry> + Open for writing only; place the file pointer at the + beginning of the file and truncate the file to zero length. + If the file does not exist, attempt to create it. + </entry> + </row> + <row> + <entry><literal>'w+'</literal></entry> + <entry> + Open for reading and writing; place the file pointer at + the beginning of the file and truncate the file to zero + length. If the file does not exist, attempt to create it. + </entry> + </row> + <row> + <entry><literal>'a'</literal></entry> + <entry> + Open for writing only; place the file pointer at the end of + the file. If the file does not exist, attempt to create it. + </entry> + </row> + <row> + <entry><literal>'a+'</literal></entry> + <entry> + Open for reading and writing; place the file pointer at + the end of the file. If the file does not exist, attempt to + create it. + </entry> + </row> + <row> + <entry><literal>'x'</literal></entry> + <entry> + Create and open for writing only; place the file pointer at the + beginning of the file. If the file already exists, the + <function>fopen</function> call will fail by returning &false; and + generating an error of level <constant>E_WARNING</constant>. If + the file does not exist, attempt to create it. This is equivalent + to specifying <literal>O_EXCL|O_CREAT</literal> flags for the + underlying <literal>open(2)</literal> system call. + </entry> + </row> + <row> + <entry><literal>'x+'</literal></entry> + <entry> + Create and open for reading and writing; place the file pointer at + the beginning of the file. If the file already exists, the + <function>fopen</function> call will fail by returning &false; and + generating an error of level <constant>E_WARNING</constant>. If + the file does not exist, attempt to create it. This is equivalent + to specifying <literal>O_EXCL|O_CREAT</literal> flags for the + underlying <literal>open(2)</literal> system call. + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <note> + <para> + Different operating system families have different line-ending + conventions. When you write a text file and want to insert a line + break, you need to use the correct line-ending character(s) for your + operating system. Unix based systems use <literal>\n</literal> as the + line ending character, Windows based systems use <literal>\r\n</literal> + as the line ending characters and Macintosh based systems use + <literal>\r</literal> as the line ending character. + </para> + <para> + If you use the wrong line ending characters when writing your files, you + might find that other applications that open those files will "look + funny". + </para> + <para> + Windows offers a text-mode translation flag (<literal>'t'</literal>) + which will transparently translate <literal>\n</literal> to + <literal>\r\n</literal> when working with the file. In contrast, you + can also use <literal>'b'</literal> to force binary mode, which will not + translate your data. To use these flags, specify either + <literal>'b'</literal> or <literal>'t'</literal> as the last character + of the <parameter>mode</parameter> parameter. + </para> + <para> + The default translation mode depends on the SAPI and version of PHP that + you are using, so you are encouraged to always specify the appropriate + flag for portability reasons. You should use the <literal>'t'</literal> + mode if you are working with plain-text files and you use + <literal>\n</literal> to delimit your line endings in your script, but + expect your files to be readable with applications such as notepad. You + should use the <literal>'b'</literal> in all other cases. + </para> + <para> + If you do not specify the 'b' flag when working with binary files, you + may experience strange problems with your data, including broken image + files and strange problems with <literal>\r\n</literal> characters. + </para> + </note> + <note> + <para> + For portability, it is strongly recommended that you always + use the 'b' flag when opening files with <function>fopen</function>. + </para> + </note> + <note> + <para> + Again, for portability, it is also strongly recommended that + you re-write code that uses or relies upon the <literal>'t'</literal> + mode so that it uses the correct line endings and + <literal>'b'</literal> mode instead. + </para> + </note> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>use_include_path</parameter></term> + <listitem> + <para> + The optional third <parameter>use_include_path</parameter> parameter + can be set to '1' or &true; if you want to search for the file in the + <link linkend="ini.include-path">include_path</link>, too. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>context</parameter></term> + <listitem> + ¬e.context-support; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a file pointer resource on success, or &false; on error. + </para> + </refsect1> + + <refsect1 role="errors"> + &reftitle.errors; + <para> + If the open fails, the function an error of level + <constant>E_WARNING</constant> is generated. You may use <link + linkend="language.operators.errorcontrol">@</link> to suppress this + warning. + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> <tgroup cols="2"> <thead> <row> - <entry><parameter>mode</parameter></entry> - <entry>Description</entry> + <entry>&Version;</entry> + <entry>&Description;</entry> </row> </thead> <tbody> <row> - <entry><literal>'r'</literal></entry> + <entry>4.3.2</entry> <entry> - Open for reading only; place the file pointer at the - beginning of the file. + As of PHP 4.3.2, the default mode is set to binary for all platforms + that distinguish between binary and text mode. If you are having + problems with your scripts after upgrading, try using the + <literal>'t'</literal> flag as a workaround until you have made your + script more portable as mentioned below </entry> </row> <row> - <entry><literal>'r+'</literal></entry> + <entry>4.3.2</entry> <entry> - Open for reading and writing; place the file pointer at - the beginning of the file. - </entry> - </row> - <row> - <entry><literal>'w'</literal></entry> - <entry> - Open for writing only; place the file pointer at the - beginning of the file and truncate the file to zero length. - If the file does not exist, attempt to create it. - </entry> - </row> - <row> - <entry><literal>'w+'</literal></entry> - <entry> - Open for reading and writing; place the file pointer at - the beginning of the file and truncate the file to zero - length. If the file does not exist, attempt to create it. - </entry> - </row> - <row> - <entry><literal>'a'</literal></entry> - <entry> - Open for writing only; place the file pointer at the end of - the file. If the file does not exist, attempt to create it. - </entry> - </row> - <row> - <entry><literal>'a+'</literal></entry> - <entry> - Open for reading and writing; place the file pointer at - the end of the file. If the file does not exist, attempt to - create it. - </entry> - </row> - <row> - <entry><literal>'x'</literal></entry> - <entry> - Create and open for writing only; place the file pointer at the - beginning of the file. If the file already exists, the - <function>fopen</function> call will fail by returning &false; and - generating an error of level <constant>E_WARNING</constant>. If - the file does not exist, attempt to create it. This is equivalent - to specifying <literal>O_EXCL|O_CREAT</literal> flags for the - underlying <literal>open(2)</literal> system call. This option is - supported in PHP 4.3.2 and later, and only works for local files. - </entry> - </row> - <row> - <entry><literal>'x+'</literal></entry> - <entry> - Create and open for reading and writing; place the file pointer at - the beginning of the file. If the file already exists, the - <function>fopen</function> call will fail by returning &false; and - generating an error of level <constant>E_WARNING</constant>. If - the file does not exist, attempt to create it. This is equivalent - to specifying <literal>O_EXCL|O_CREAT</literal> flags for the - underlying <literal>open(2)</literal> system call. This option is - supported in PHP 4.3.2 and later, and only works for local files. + The <literal>'x'</literal> and <literal>'x+'</literal> option was + added </entry> </row> </tbody> </tgroup> - </table> - </para> - <note> - <para> - Different operating system families have different line-ending - conventions. When you write a text file and want to insert a line - break, you need to use the correct line-ending character(s) for your - operating system. Unix based systems use <literal>\n</literal> as the - line ending character, Windows based systems use <literal>\r\n</literal> - as the line ending characters and Macintosh based systems use - <literal>\r</literal> as the line ending character. - </para> - <para> - If you use the wrong line ending characters when writing your files, you - might find that other applications that open those files will "look - funny". - </para> - <para> - Windows offers a text-mode translation flag (<literal>'t'</literal>) - which will transparently translate <literal>\n</literal> to - <literal>\r\n</literal> when working with the file. In contrast, you - can also use <literal>'b'</literal> to force binary mode, which will not - translate your data. To use these flags, specify either - <literal>'b'</literal> or <literal>'t'</literal> as the last character - of the <parameter>mode</parameter> parameter. - </para> - <para> - The default translation mode depends on the SAPI and version of PHP that - you are using, so you are encouraged to always specify the appropriate - flag for portability reasons. You should use the <literal>'t'</literal> - mode if you are working with plain-text files and you use - <literal>\n</literal> to delimit your line endings in your script, but - expect your files to be readable with applications such as notepad. You - should use the <literal>'b'</literal> in all other cases. - </para> - <para> - If you do not specify the 'b' flag when working with binary files, you - may experience strange problems with your data, including broken image - files and strange problems with <literal>\r\n</literal> characters. - </para> - </note> - <note> - <para> - For portability, it is strongly recommended that you always - use the 'b' flag when opening files with <function>fopen</function>. - </para> - </note> - <note> - <para> - Again, for portability, it is also strongly recommended that - you re-write code that uses or relies upon the <literal>'t'</literal> - mode so that it uses the correct line endings and - <literal>'b'</literal> mode instead. - </para> - </note> - <para> - The optional third <parameter>use_include_path</parameter> parameter - can be set to '1' or &true; if you want to search for the file in - the <link linkend="ini.include-path">include_path</link>, too. + </informaltable> </para> - <simpara> - If the open fails, the function returns &false; and an error of - level <constant>E_WARNING</constant> is generated. You may use - <link linkend="language.operators.errorcontrol">@</link> to - suppress this warning. - </simpara> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>fopen</function> examples</title> @@ -233,42 +315,40 @@ </programlisting> </example> </para> - <simpara> - If you are experiencing problems with reading and writing to - files and you're using the server module version of PHP, remember - to make sure that the files and directories you're using are - accessible to the server process. - </simpara> - <para> - On the Windows platform, be careful to escape any backslashes - used in the path to the file, or use forward slashes. - <informalexample> - <programlisting role="php"> -<![CDATA[ -<?php -$handle = fopen("c:\\data\\info.txt", "r"); -?> -]]> - </programlisting> - </informalexample> - </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; &warn.ssl-non-standard; ¬e.sm.uidcheck.dir; - <simpara> - See also <xref linkend="wrappers"/>, - <function>fclose</function>, - <function>fgets</function>, - <function>fread</function>, - <function>fwrite</function>, - <function>fsockopen</function>, - <function>file</function>, - <function>file_exists</function>, - <function>is_readable</function>, - <function>stream_set_timeout</function>, - <function>popen</function>, and - <function>stream_context_create</function>. - </simpara> + <para> + If you are experiencing problems with reading and writing to files and + you're using the server module version of PHP, remember to make sure that + the files and directories you're using are accessible to the server + process. + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><xref linkend="wrappers"/></member> + <member><function>fclose</function></member> + <member><function>fgets</function></member> + <member><function>fread</function></member> + <member><function>fwrite</function></member> + <member><function>fsockopen</function></member> + <member><function>file</function></member> + <member><function>file_exists</function></member> + <member><function>is_readable</function></member> + <member><function>stream_set_timeout</function></member> + <member><function>popen</function></member> + <member><function>stream_context_create</function></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fputs.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fputs.xml diff -u phpdoc/en/reference/filesystem/functions/fputs.xml:1.6 phpdoc/en/reference/filesystem/functions/fputs.xml:1.7 --- phpdoc/en/reference/filesystem/functions/fputs.xml:1.6 Mon Apr 25 16:17:01 2005 +++ phpdoc/en/reference/filesystem/functions/fputs.xml Sat Jun 16 01:17:14 2007 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.fputs"> <refnamediv> <refname>fputs</refname> @@ -14,6 +13,7 @@ <function>fwrite</function>. </simpara> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/ftell.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/filesystem/functions/ftell.xml diff -u phpdoc/en/reference/filesystem/functions/ftell.xml:1.8 phpdoc/en/reference/filesystem/functions/ftell.xml:1.9 --- phpdoc/en/reference/filesystem/functions/ftell.xml:1.8 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/ftell.xml Sat Jun 16 01:17:14 2007 @@ -1,33 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.ftell"> <refnamediv> <refname>ftell</refname> <refpurpose>Tells file pointer read/write position</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>ftell</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> - Returns the position of the file pointer referenced by - <parameter>handle</parameter>; i.e., its offset into the - file stream. + Tells the file pointer read/write position. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - If an error occurs, returns &false;. + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <para> + The file pointer must be valid, and must point to a file successfully + opened by <function>fopen</function> or <function>popen</function>. + <function>ftell</function> gives undefined results for append-only streams + (opened with "a" flag). + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - The file pointer must be valid, and must point to a file - successfully opened by <function>fopen</function> or - <function>popen</function>. - <function>ftell</function> gives undefined results for append-only streams - (opened with "a" flag). + Returns the position of the file pointer referenced by + <parameter>handle</parameter>; i.e., its offset into the file stream. </para> <para> + If an error occurs, returns &false;. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> <example> <title><function>ftell</function> example</title> <programlisting role="php"> @@ -48,11 +70,20 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>fopen</function>, <function>popen</function>, - <function>fseek</function>, and <function>rewind</function>. + <simplelist> + <member><function>fopen</function></member> + <member><function>popen</function></member> + <member><function>fseek</function></member> + <member><function>rewind</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/glob.xml?r1=1.23&r2=1.24&diff_format=u Index: phpdoc/en/reference/filesystem/functions/glob.xml diff -u phpdoc/en/reference/filesystem/functions/glob.xml:1.23 phpdoc/en/reference/filesystem/functions/glob.xml:1.24 --- phpdoc/en/reference/filesystem/functions/glob.xml:1.23 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/glob.xml Sat Jun 16 01:17:14 2007 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.23 $ --> +<!-- $Revision: 1.24 $ --> <refentry id="function.glob"> <refnamediv> <refname>glob</refname> <refpurpose>Find pathnames matching a pattern</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>glob</methodname> <methodparam><type>string</type><parameter>pattern</parameter></methodparam> @@ -16,71 +17,118 @@ The <function>glob</function> function searches for all the pathnames matching <parameter>pattern</parameter> according to the rules used by the libc glob() function, which is similar to the rules used by common - shells. No tilde expansion or parameter substitution is done. + shells. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>pattern</parameter></term> + <listitem> + <para> + The pattern. No tilde expansion or parameter substitution is done. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>flags</parameter></term> + <listitem> + <para> + Valid flags: + <itemizedlist> + <listitem> + <simpara> + <constant>GLOB_MARK</constant> - Adds a slash to each item returned + </simpara> + </listitem> + <listitem> + <simpara> + <constant>GLOB_NOSORT</constant> - Return files as they appear in the + directory (no sorting) + </simpara> + </listitem> + <listitem> + <simpara> + <constant>GLOB_NOCHECK</constant> - Return the search pattern if no + files matching it were found + </simpara> + </listitem> + <listitem> + <simpara> + <constant>GLOB_NOESCAPE</constant> - Backslashes do not quote + metacharacters + </simpara> + </listitem> + <listitem> + <simpara> + <constant>GLOB_BRACE</constant> - Expands {a,b,c} to match 'a', 'b', + or 'c' + </simpara> + </listitem> + <listitem> + <simpara> + <constant>GLOB_ONLYDIR</constant> - Return only directory entries + which match the pattern + </simpara> + </listitem> + <listitem> + <simpara> + <constant>GLOB_ERR</constant> - Stop on read errors (like unreadable + directories), by default errors are ignored. + </simpara> + </listitem> + </itemizedlist> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> Returns an array containing the matched files/directories, an empty array if no file matched or &false; on error. </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; <para> - Valid flags: - <itemizedlist> - <listitem> - <simpara> - <constant>GLOB_MARK</constant> - Adds a slash to each item returned - </simpara> - </listitem> - <listitem> - <simpara> - <constant>GLOB_NOSORT</constant> - Return files as they appear in the - directory (no sorting) - </simpara> - </listitem> - <listitem> - <simpara> - <constant>GLOB_NOCHECK</constant> - Return the search pattern if no - files matching it were found - </simpara> - </listitem> - <listitem> - <simpara> - <constant>GLOB_NOESCAPE</constant> - Backslashes do not quote - metacharacters - </simpara> - </listitem> - <listitem> - <simpara> - <constant>GLOB_BRACE</constant> - Expands {a,b,c} to match 'a', 'b', - or 'c' - </simpara> - <note> - <simpara> - This flag is not available on some non GNU systems, like Solaris. - </simpara> - </note> - </listitem> - <listitem> - <simpara> - <constant>GLOB_ONLYDIR</constant> - Return only directory entries - which match the pattern - </simpara> - <note> - <simpara> - Before PHP 4.3.3 <constant>GLOB_ONLYDIR</constant> was - <emphasis role="strong">not</emphasis> - available on Windows and other systems not using the GNU - C library. - </simpara> - </note> - </listitem> - <listitem> - <simpara> - <constant>GLOB_ERR</constant> - Stop on read errors (like unreadable - directories), by default errors are ignored. Added in PHP 5.1.0. - </simpara> - </listitem> - </itemizedlist> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.1.0</entry> + <entry> + <constant>GLOB_ERR</constant> was added + </entry> + </row> + <row> + <entry>4.3.3</entry> + <entry> + <constant>GLOB_ONLYDIR</constant> bacame available on Windows and + other systems not using the GNU C library + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title> @@ -106,20 +154,36 @@ </screen> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; <note> <simpara> This function isn't available on some systems (e.g. old Sun OS). </simpara> </note> + <note> + <simpara> + The <constant>GLOB_BRACE</constant> flag is not available on some non GNU + systems, like Solaris. + </simpara> + </note> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>opendir</function>, - <function>readdir</function>, - <function>closedir</function>, and <function>fnmatch</function>. + <simplelist> + <member><function>opendir</function></member> + <member><function>readdir</function></member> + <member><function>closedir</function></member> + <member><function>fnmatch</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/is-dir.xml?r1=1.12&r2=1.13&diff_format=u Index: phpdoc/en/reference/filesystem/functions/is-dir.xml diff -u phpdoc/en/reference/filesystem/functions/is-dir.xml:1.12 phpdoc/en/reference/filesystem/functions/is-dir.xml:1.13 --- phpdoc/en/reference/filesystem/functions/is-dir.xml:1.12 Mon Feb 5 18:03:39 2007 +++ phpdoc/en/reference/filesystem/functions/is-dir.xml Sat Jun 16 01:17:14 2007 @@ -1,23 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.13 $ --> <refentry id="function.is-dir"> <refnamediv> <refname>is_dir</refname> <refpurpose>Tells whether the filename is a directory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>is_dir</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the filename exists and is a directory. If - <parameter>filename</parameter> is a relative filename, it will be - checked relative to the current working directory. + Tells whether the given filename is a directory. </para> - ¬e.clearstatcache; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. If <parameter>filename</parameter> is a relative + filename, it will be checked relative to the current working + directory. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the filename exists and is a directory, &false; + otherwise. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>is_dir</function> example</title> @@ -41,14 +68,27 @@ </screen> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; &tip.fopen-wrapper.stat; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>chdir</function>, <link linkend="class.dir">dir</link>, - <function>opendir</function>, <function>is_file</function> and - <function>is_link</function>. + <simplelist> + <member><function>chdir</function></member> + <member><link linkend="class.dir">dir</link></member> + <member><function>opendir</function></member> + <member><function>is_file</function></member> + <member><function>is_link</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/is-executable.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc/en/reference/filesystem/functions/is-executable.xml diff -u phpdoc/en/reference/filesystem/functions/is-executable.xml:1.13 phpdoc/en/reference/filesystem/functions/is-executable.xml:1.14 --- phpdoc/en/reference/filesystem/functions/is-executable.xml:1.13 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/is-executable.xml Sat Jun 16 01:17:14 2007 @@ -1,24 +1,73 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.14 $ --> <refentry id="function.is-executable"> <refnamediv> <refname>is_executable</refname> <refpurpose>Tells whether the filename is executable</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>is_executable</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the filename exists and is executable. + Tells whether the filename is executable. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the filename exists and is executable, or &false; on + error. + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; <para> - <function>is_executable</function> became available with - <productname>Windows</productname> in PHP version 5.0.0. + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + <function>is_executable</function> became available with + <productname>Windows</productname> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>is_executable</function> example</title> @@ -39,16 +88,24 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.clearstatcache; - &tip.fopen-wrapper.stat; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>is_file</function> and - <function>is_link</function>. + <simplelist> + <member><function>is_file</function></member> + <member><function>is_link</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/is-file.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/filesystem/functions/is-file.xml diff -u phpdoc/en/reference/filesystem/functions/is-file.xml:1.9 phpdoc/en/reference/filesystem/functions/is-file.xml:1.10 --- phpdoc/en/reference/filesystem/functions/is-file.xml:1.9 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/is-file.xml Sat Jun 16 01:17:14 2007 @@ -1,20 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.is-file"> <refnamediv> <refname>is_file</refname> <refpurpose>Tells whether the filename is a regular file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>is_file</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the filename exists and is a regular file. + Tells whether the given file is a regular file. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the filename exists and is a regular file, &false; + otherwise. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>is_file</function> example</title> @@ -35,16 +63,24 @@ </screen> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.clearstatcache; - &tip.fopen-wrapper.stat; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>is_dir</function> and - <function>is_link</function>. + <simplelist> + <member><function>is_dir</function></member> + <member><function>is_link</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/is-link.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filesystem/functions/is-link.xml diff -u phpdoc/en/reference/filesystem/functions/is-link.xml:1.7 phpdoc/en/reference/filesystem/functions/is-link.xml:1.8 --- phpdoc/en/reference/filesystem/functions/is-link.xml:1.7 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/is-link.xml Sat Jun 16 01:17:14 2007 @@ -1,30 +1,63 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.is-link"> <refnamediv> <refname>is_link</refname> <refpurpose>Tells whether the filename is a symbolic link</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>is_link</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the filename exists and is a symbolic link. + Tells whether the given file is a symbolic link. </para> + </refsect1> - ¬e.clearstatcache; + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the filename exists and is a symbolic link, &false; + otherwise. + </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; &tip.fopen-wrapper.stat; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>is_dir</function>, - <function>is_file</function>, and <function>readlink</function>. + <simplelist> + <member><function>is_dir</function></member> + <member><function>is_file</function></member> + <member><function>readlink</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/is-readable.xml?r1=1.12&r2=1.13&diff_format=u Index: phpdoc/en/reference/filesystem/functions/is-readable.xml diff -u phpdoc/en/reference/filesystem/functions/is-readable.xml:1.12 phpdoc/en/reference/filesystem/functions/is-readable.xml:1.13 --- phpdoc/en/reference/filesystem/functions/is-readable.xml:1.12 Fri Jun 15 19:45:56 2007 +++ phpdoc/en/reference/filesystem/functions/is-readable.xml Sat Jun 16 01:17:14 2007 @@ -1,26 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.13 $ --> <refentry id="function.is-readable"> <refnamediv> <refname>is_readable</refname> <refpurpose>Tells whether the filename is readable</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>is_readable</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the file or directory specified by - <parameter>filename</parameter> exists and is readable. + Tells whether the filename is readable. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - Keep in mind that PHP may be accessing the file as the user - id that the web server runs as (often 'nobody'). Safe mode - limitations are not taken into account. + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the file or directory specified by + <parameter>filename</parameter> exists and is readable, &false; otherwise. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>is_readable</function> example</title> @@ -38,23 +60,35 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + <para> + Keep in mind that PHP may be accessing the file as the user + id that the web server runs as (often 'nobody'). Safe mode + limitations are not taken into account. + </para> ¬e.clearstatcache; - &tip.fopen-wrapper.stat; - <note> <para> The check is done using the real UID/GID instead of the effective one. </para> </note> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>is_writable</function>, - <function>file_exists</function>, and - <function>fgets</function>. + <simplelist> + <member><function>is_writable</function></member> + <member><function>file_exists</function></member> + <member><function>fgets</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/is-writeable.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/filesystem/functions/is-writeable.xml diff -u phpdoc/en/reference/filesystem/functions/is-writeable.xml:1.4 phpdoc/en/reference/filesystem/functions/is-writeable.xml:1.5 --- phpdoc/en/reference/filesystem/functions/is-writeable.xml:1.4 Mon Apr 25 16:17:01 2005 +++ phpdoc/en/reference/filesystem/functions/is-writeable.xml Sat Jun 16 01:17:14 2007 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.55 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.is-writeable"> <refnamediv> <refname>is_writeable</refname> @@ -14,6 +13,7 @@ <function>is_writable</function>. </simpara> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/lchgrp.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/reference/filesystem/functions/lchgrp.xml diff -u phpdoc/en/reference/filesystem/functions/lchgrp.xml:1.2 phpdoc/en/reference/filesystem/functions/lchgrp.xml:1.3 --- phpdoc/en/reference/filesystem/functions/lchgrp.xml:1.2 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/lchgrp.xml Sat Jun 16 01:17:14 2007 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.lchgrp"> <refnamediv> <refname>lchgrp</refname> <refpurpose>Changes group ownership of symlink</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>lchgrp</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -14,22 +15,64 @@ </methodsynopsis> <para> Attempts to change the group of the symlink <parameter>filename</parameter> - to <parameter>group</parameter> (specified by name or number). Only the - superuser may change the group of a symlink arbitrarily; other users may - change the group of a symlink to any group of which that user is a member. + to <parameter>group</parameter>. </para> <para> + Only the superuser may change the group of a symlink arbitrarily; other + users may change the group of a symlink to any group of which that user is + a member. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the symlink. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>group</parameter></term> + <listitem> + <para> + The group specified by name or number. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> &return.success; </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; ¬e.sm.uidcheck; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>chgrp</function>, - <function>lchown</function> - <function>chown</function>&listendand; - <function>chmod</function>. + <simplelist> + <member><function>chgrp</function></member> + <member><function>lchown</function></member> + <member><function>chown</function></member> + <member><function>chmod</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/lchown.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/reference/filesystem/functions/lchown.xml diff -u phpdoc/en/reference/filesystem/functions/lchown.xml:1.2 phpdoc/en/reference/filesystem/functions/lchown.xml:1.3 --- phpdoc/en/reference/filesystem/functions/lchown.xml:1.2 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/lchown.xml Sat Jun 16 01:17:14 2007 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.lchown"> <refnamediv> <refname>lchown</refname> <refpurpose>Changes user ownership of symlink</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>lchown</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -14,21 +15,62 @@ </methodsynopsis> <para> Attempts to change the owner of the symlink <parameter>filename</parameter> - to user <parameter>user</parameter> (specified by name or number). Only - the superuser may change the owner of a symlink. + to user <parameter>user</parameter>. </para> <para> + Only the superuser may change the owner of a symlink. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>user</parameter></term> + <listitem> + <para> + User name or number. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> &return.success; </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; ¬e.sm.uidcheck; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>chown</function>, - <function>lchgrp</function>, - <function>chgrp</function>&listendand; - <function>chmod</function>. + <simplelist> + <member><function>chgrp</function></member> + <member><function>lchgrp</function></member> + <member><function>chgrp</function></member> + <member><function>chmod</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/link.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/filesystem/functions/link.xml diff -u phpdoc/en/reference/filesystem/functions/link.xml:1.8 phpdoc/en/reference/filesystem/functions/link.xml:1.9 --- phpdoc/en/reference/filesystem/functions/link.xml:1.8 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/link.xml Sat Jun 16 01:17:14 2007 @@ -1,31 +1,71 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.link"> <refnamediv> <refname>link</refname> <refpurpose>Create a hard link</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>link</methodname> <methodparam><type>string</type><parameter>target</parameter></methodparam> <methodparam><type>string</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> - <function>link</function> creates a hard link. &return.success; + <function>link</function> creates a hard link. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>target</parameter></term> + <listitem> + <para> + Target of the link. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>link</parameter></term> + <listitem> + <para> + The link name. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; ¬e.no-windows; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also the <function>symlink</function> to create soft links, - and <function>readlink</function> along with - <function>linkinfo</function>. + <simplelist> + <member><function>symlink</function></member> + <member><function>readlink</function></member> + <member><function>linkinfo</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/linkinfo.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/filesystem/functions/linkinfo.xml diff -u phpdoc/en/reference/filesystem/functions/linkinfo.xml:1.8 phpdoc/en/reference/filesystem/functions/linkinfo.xml:1.9 --- phpdoc/en/reference/filesystem/functions/linkinfo.xml:1.8 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/linkinfo.xml Sat Jun 16 01:17:14 2007 @@ -1,27 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.linkinfo"> <refnamediv> <refname>linkinfo</refname> <refpurpose>Gets information about a link</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>linkinfo</methodname> <methodparam><type>string</type><parameter>path</parameter></methodparam> </methodsynopsis> <para> - <function>linkinfo</function> returns the <literal>st_dev</literal> - field of the Unix C stat structure returned by the <literal>lstat</literal> - system call. This function is used to verify if a link (pointed to by - <parameter>path</parameter>) really exists (using the same method - as the S_ISLNK macro defined in <filename>stat.h</filename>). - Returns 0 or &false; in - case of error. + Gets information about a link. </para> <para> + This function is used to verify if a link (pointed to by + <parameter>path</parameter>) really exists (using the same method as the + S_ISLNK macro defined in <filename>stat.h</filename>). + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>path</parameter></term> + <listitem> + <para> + Path to the link. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + <function>linkinfo</function> returns the <literal>st_dev</literal> field + of the Unix C stat structure returned by the <literal>lstat</literal> + system call. Returns 0 or &false; in case of error. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> <example> <title><function>linkinfo</function> example</title> <programlisting role="php"> @@ -35,12 +63,24 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-windows; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>symlink</function>, <function>link</function>, - and <function>readlink</function>. + <simplelist> + <member><function>symlink</function></member> + <member><function>link</function></member> + <member><function>readlink</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/lstat.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filesystem/functions/lstat.xml diff -u phpdoc/en/reference/filesystem/functions/lstat.xml:1.7 phpdoc/en/reference/filesystem/functions/lstat.xml:1.8 --- phpdoc/en/reference/filesystem/functions/lstat.xml:1.7 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/lstat.xml Sat Jun 16 01:17:14 2007 @@ -1,38 +1,66 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.lstat"> <refnamediv> <refname>lstat</refname> <refpurpose>Gives information about a file or symbolic link</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>lstat</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> Gathers the statistics of the file or symbolic link named by - <parameter>filename</parameter>. This function is identical to the - <function>stat</function> function except that if the - <parameter>filename</parameter> parameter is a symbolic link, the - status of the symbolic link is returned, not the status of the - file pointed to by the symbolic link. + <parameter>filename</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to a file or a symbolic link. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> See the manual page for <function>stat</function> for information on the structure of the array that <function>lstat</function> returns. + This function is identical to the <function>stat</function> function + except that if the <parameter>filename</parameter> parameter is a symbolic + link, the status of the symbolic link is returned, not the status of the + file pointed to by the symbolic link. </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.clearstatcache; - &tip.fopen-wrapper.stat; + </refsect1> - <simpara> - See also <function>stat</function>. - </simpara> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>stat</function></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/mkdir.xml?r1=1.18&r2=1.19&diff_format=u Index: phpdoc/en/reference/filesystem/functions/mkdir.xml diff -u phpdoc/en/reference/filesystem/functions/mkdir.xml:1.18 phpdoc/en/reference/filesystem/functions/mkdir.xml:1.19 --- phpdoc/en/reference/filesystem/functions/mkdir.xml:1.18 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/mkdir.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.18 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.39 --> +<!-- $Revision: 1.19 $ --> <refentry id="function.mkdir"> <refnamediv> <refname>mkdir</refname> <refpurpose>Makes directory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>mkdir</methodname> <methodparam><type>string</type><parameter>pathname</parameter></methodparam> @@ -18,25 +18,109 @@ <para> Attempts to create the directory specified by pathname. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>pathname</parameter></term> + <listitem> + <para> + The directory path. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>mode</parameter></term> + <listitem> + <para> + The mode is 0777 by default, which means the widest possible + access. For more information on modes, read the details + on the <function>chmod</function> page. + </para> + <note> + <para> + <parameter>mode</parameter> is ignored on Windows. + </para> + </note> + <para> + Note that you probably want to specify the mode as an octal number, + which means it should have a leading zero. The mode is also modified + by the current umask, which you can change using + <function>umask</function>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>recursive</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>context</parameter></term> + <listitem> + ¬e.context-support; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + The <parameter>recursive</parameter> parameter was added + </entry> + </row> + <row> + <entry>5.0.0</entry> + <entry> + As of PHP 5.0.0 <function>mkdir</function> can also be used with + <emphasis>some</emphasis> URL wrappers. Refer to <xref + linkend="wrappers"/> for a listing of which wrappers support + <function>mkdir</function> + </entry> + </row> + <row> + <entry>4.2.0</entry> + <entry> + The <parameter>mode</parameter> parameter became optional. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> - Note that you probably want to specify the mode as an - octal number, which means it should have a leading zero. - The mode is also modified by the current umask, which you - can change using <function>umask</function>. - </para> - <para> - <note> - <para> - Mode is ignored on Windows, and became optional in PHP 4.2.0. - </para> - </note> - </para> - <para> - The mode is 0777 by default, which means the widest possible - access. For more information on modes, read the details - on the <function>chmod</function> page. <example> - <title><function>mkdir</function> example</title> + <title><function>mkdir</function> example</title> <programlisting role="php"> <![CDATA[ <?php @@ -46,27 +130,22 @@ </programlisting> </example> </para> - <para> - &return.success; - </para> - <note> - <simpara> - As of PHP 5.0.0 <function>mkdir</function> can also be - used with <emphasis>some</emphasis> URL wrappers. Refer to <xref linkend="wrappers"/> - for a listing of which wrappers support <function>mkdir</function>. - </simpara> - </note> - ¬e.context-support; - <note> - <simpara> - The <parameter>recursive</parameter> parameter was added as of PHP 5.0.0. - </simpara> - </note> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.sm.uidcheck.dir; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>rmdir</function>. + <simplelist> + <member><function>rmdir</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/pclose.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/filesystem/functions/pclose.xml diff -u phpdoc/en/reference/filesystem/functions/pclose.xml:1.5 phpdoc/en/reference/filesystem/functions/pclose.xml:1.6 --- phpdoc/en/reference/filesystem/functions/pclose.xml:1.5 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/pclose.xml Sat Jun 16 01:17:14 2007 @@ -1,33 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.pclose"> <refnamediv> <refname>pclose</refname> <refpurpose>Closes process file pointer</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>pclose</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> - Closes a file pointer to a pipe opened by - <function>popen</function>. + Closes a file pointer to a pipe opened by <function>popen</function>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - The file pointer must be valid, and must have been returned by a - successful call to <function>popen</function>. + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <para> + The file pointer must be valid, and must have been returned by a + successful call to <function>popen</function>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - Returns the termination status of the process that was - run. + Returns the termination status of the process that was run. </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>popen</function>. + <simplelist> + <member><function>popen</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/readlink.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/filesystem/functions/readlink.xml diff -u phpdoc/en/reference/filesystem/functions/readlink.xml:1.8 phpdoc/en/reference/filesystem/functions/readlink.xml:1.9 --- phpdoc/en/reference/filesystem/functions/readlink.xml:1.8 Fri Jun 15 19:45:56 2007 +++ phpdoc/en/reference/filesystem/functions/readlink.xml Sat Jun 16 01:17:14 2007 @@ -1,22 +1,47 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.readlink"> <refnamediv> <refname>readlink</refname> <refpurpose>Returns the target of a symbolic link</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>readlink</methodname> <methodparam><type>string</type><parameter>path</parameter></methodparam> </methodsynopsis> <para> - <function>readlink</function> does the same as the readlink C - function and returns the contents of the symbolic link path or &false; - in case of error. + <function>readlink</function> does the same as the readlink C function. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>path</parameter></term> + <listitem> + <para> + The symbolic link path. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the contents of the symbolic link path or &false; on error. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>readlink</function> example</title> @@ -32,13 +57,24 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-windows; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>is_link</function>, - <function>symlink</function>, and - <function>linkinfo</function>. + <simplelist> + <member><function>is_link</function></member> + <member><function>symlink</function></member> + <member><function>linkinfo</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/rename.xml?r1=1.12&r2=1.13&diff_format=u Index: phpdoc/en/reference/filesystem/functions/rename.xml diff -u phpdoc/en/reference/filesystem/functions/rename.xml:1.12 phpdoc/en/reference/filesystem/functions/rename.xml:1.13 --- phpdoc/en/reference/filesystem/functions/rename.xml:1.12 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/rename.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.13 $ --> <refentry id="function.rename"> <refnamediv> <refname>rename</refname> <refpurpose>Renames a file or directory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>rename</methodname> <methodparam><type>string</type><parameter>oldname</parameter></methodparam> @@ -18,9 +18,87 @@ Attempts to rename <parameter>oldname</parameter> to <parameter>newname</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>oldname</parameter></term> + <listitem> + <para> + </para> + <note> + <para> + The old name. The wrapper used in <parameter>oldname</parameter> + <emphasis>must</emphasis> match the wrapper used in + <parameter>newname</parameter>. + </para> + </note> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>newname</parameter></term> + <listitem> + <para> + The new name. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>context</parameter></term> + <listitem> + ¬e.context-support; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + <function>rename</function> can now also be used with + <emphasis>some</emphasis> URL wrappers. Refer to <xref + linkend="wrappers"/> for a listing of which wrappers + support <function>rename</function>. + </entry> + </row> + <row> + <entry>4.3.3</entry> + <entry> + <function>rename</function> is now able to rename files across + partitions on *nix based systems. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Example with <function>rename</function></title> @@ -33,32 +111,19 @@ </programlisting> </example> </para> - <note> - <para> - Prior to PHP 4.3.3, <function>rename</function> could not rename files - across partitions on *nix based systems. - </para> - </note> - <note> - <simpara> - As of PHP 5.0.0 <function>rename</function> can also be - used with <emphasis>some</emphasis> URL wrappers. Refer to <xref linkend="wrappers"/> - for a listing of which wrappers support <function>rename</function>. - </simpara> - </note> - <note> - <simpara> - The wrapper used in <parameter>oldname</parameter> <emphasis>MUST</emphasis> - match the wrapper used in <parameter>newname</parameter>. - </simpara> - </note> - ¬e.context-support; - <para> - See also <function>copy</function>, - <function>unlink</function>, and - <function>move_uploaded_file</function>. + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>copy</function></member> + <member><function>unlink</function></member> + <member><function>move_uploaded_file</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/rewind.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/filesystem/functions/rewind.xml diff -u phpdoc/en/reference/filesystem/functions/rewind.xml:1.9 phpdoc/en/reference/filesystem/functions/rewind.xml:1.10 --- phpdoc/en/reference/filesystem/functions/rewind.xml:1.9 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/rewind.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.rewind"> <refnamediv> <refname>rewind</refname> <refpurpose>Rewind the position of a file pointer</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>rewind</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> @@ -16,24 +16,49 @@ Sets the file position indicator for <parameter>handle</parameter> to the beginning of the file stream. </para> - <para> - &return.success; - </para> - <para> - The file pointer must be valid, and must point to a file - successfully opened by <function>fopen</function>. - </para> <note> <para> - If you have opened the file in append ("a" or "a+") mode, any data you write - to the file will always be appended, regardless of the file position. + If you have opened the file in append ("a" or "a+") mode, any data you + write to the file will always be appended, regardless of the file + position. </para> </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - See also <function>fseek</function> and - <function>ftell</function>. + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <para> + The file pointer must be valid, and must point to a file + successfully opened by <function>fopen</function>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>fseek</function></member> + <member><function>ftell</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/rmdir.xml?r1=1.10&r2=1.11&diff_format=u Index: phpdoc/en/reference/filesystem/functions/rmdir.xml diff -u phpdoc/en/reference/filesystem/functions/rmdir.xml:1.10 phpdoc/en/reference/filesystem/functions/rmdir.xml:1.11 --- phpdoc/en/reference/filesystem/functions/rmdir.xml:1.10 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/rmdir.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.11 $ --> <refentry id="function.rmdir"> <refnamediv> <refname>rmdir</refname> <refpurpose>Removes directory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>rmdir</methodname> <methodparam><type>string</type><parameter>dirname</parameter></methodparam> @@ -16,21 +16,80 @@ <para> Attempts to remove the directory named by <parameter>dirname</parameter>. The directory must be empty, and the relevant permissions must permit this. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>dirname</parameter></term> + <listitem> + <para> + Path to the directory. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>context</parameter></term> + <listitem> + ¬e.context-support; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> &return.success; </para> - <note> - <simpara> - As of PHP 5.0.0 <function>rmdir</function> can also be - used with <emphasis>some</emphasis> URL wrappers. Refer to <xref linkend="wrappers"/> - for a listing of which wrappers support <function>rmdir</function>. - </simpara> - </note> - ¬e.context-support; + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + As of PHP 5.0.0 <function>rmdir</function> can also be used with + <emphasis>some</emphasis> URL wrappers. Refer to <xref + linkend="wrappers"/> for a listing of which wrappers support + <function>rmdir</function>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.sm.uidcheck.dir; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>mkdir</function> and <function>unlink</function>. + <simplelist> + <member><function>mkdir</function></member> + <member><function>unlink</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/set-file-buffer.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filesystem/functions/set-file-buffer.xml diff -u phpdoc/en/reference/filesystem/functions/set-file-buffer.xml:1.6 phpdoc/en/reference/filesystem/functions/set-file-buffer.xml:1.7 --- phpdoc/en/reference/filesystem/functions/set-file-buffer.xml:1.6 Mon Apr 25 16:17:01 2005 +++ phpdoc/en/reference/filesystem/functions/set-file-buffer.xml Sat Jun 16 01:17:14 2007 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.set-file-buffer"> <refnamediv> <refname>set_file_buffer</refname> @@ -14,6 +13,7 @@ <function>stream_set_write_buffer</function>. </simpara> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/stat.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/reference/filesystem/functions/stat.xml diff -u phpdoc/en/reference/filesystem/functions/stat.xml:1.14 phpdoc/en/reference/filesystem/functions/stat.xml:1.15 --- phpdoc/en/reference/filesystem/functions/stat.xml:1.14 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/stat.xml Sat Jun 16 01:17:14 2007 @@ -1,37 +1,47 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.15 $ --> <refentry id="function.stat"> <refnamediv> <refname>stat</refname> <refpurpose>Gives information about a file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>stat</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> Gathers the statistics of the file named by - <parameter>filename</parameter>. If <parameter>filename</parameter> - is a symbolic link, statistics are from the file itself, not the - symlink. <function>lstat</function> is identical to <function> - stat</function> except it would instead be based off the symlinks - status. - </para> - <para> - In case of error, <function>stat</function> returns &false;. It also - will throw a warning. - </para> - <para> - Returns an array with the statistics of the file with the - following elements. This array is zero-based. In addition to - returning these attributes in a numeric array, they can be accessed - with associative indices, as noted next to each parameter; this is - available since PHP 4.0.6: + <parameter>filename</parameter>. If <parameter>filename</parameter> is a + symbolic link, statistics are from the file itself, not the symlink. </para> <para> + <function>lstat</function> is identical to <function>stat</function> + except it would instead be based off the symlinks status. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> <table> <title><function>stat</function> and <function>fstat</function> result format</title> @@ -109,26 +119,68 @@ <entry>blocks</entry> <entry>number of blocks allocated</entry> </row> - </tbody> </tgroup> </table> - * Only valid on systems supporting the st_blksize type - other systems (e.g. Windows) return -1. </para> + <para> + In case of error, <function>stat</function> returns &false;. + </para> + </refsect1> - ¬e.clearstatcache; + <refsect1 role="errors"> + &reftitle.errors; + <para> + Upon failure, an <constant>E_WARNING</constant> is emitted. + </para> + </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.0.6</entry> + <entry> + In addition to returning these attributes in a numeric array, they + can be accessed with associative indices, as noted next to each + parameter + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; &tip.fopen-wrapper.stat; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>lstat</function>, - <function>fstat</function>, - <function>filemtime</function>, and - <function>filegroup</function>. + <simplelist> + <member><function>lstat</function></member> + <member><function>fstat</function></member> + <member><function>filemtime</function></member> + <member><function>filegroup</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/symlink.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filesystem/functions/symlink.xml diff -u phpdoc/en/reference/filesystem/functions/symlink.xml:1.7 phpdoc/en/reference/filesystem/functions/symlink.xml:1.8 --- phpdoc/en/reference/filesystem/functions/symlink.xml:1.7 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/symlink.xml Sat Jun 16 01:17:14 2007 @@ -1,33 +1,72 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.symlink"> <refnamediv> <refname>symlink</refname> <refpurpose>Creates a symbolic link</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>symlink</methodname> <methodparam><type>string</type><parameter>target</parameter></methodparam> <methodparam><type>string</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> - <function>symlink</function> creates a symbolic link - to the existing <parameter>target</parameter> with - the specified name <parameter>link</parameter>. + <function>symlink</function> creates a symbolic link to the existing + <parameter>target</parameter> with the specified name + <parameter>link</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>target</parameter></term> + <listitem> + <para> + Target of the link. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>link</parameter></term> + <listitem> + <para> + The link name. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-windows; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>link</function> to create hard links, - and <function>readlink</function> along with - <function>linkinfo</function>. + <simplelist> + <member><function>link</function> to create hard links</member> + <member><function>readlink</function> along with + <function>linkinfo</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/tmpfile.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/filesystem/functions/tmpfile.xml diff -u phpdoc/en/reference/filesystem/functions/tmpfile.xml:1.9 phpdoc/en/reference/filesystem/functions/tmpfile.xml:1.10 --- phpdoc/en/reference/filesystem/functions/tmpfile.xml:1.9 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/tmpfile.xml Sat Jun 16 01:17:14 2007 @@ -1,21 +1,22 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.32 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.tmpfile"> <refnamediv> <refname>tmpfile</refname> <refpurpose>Creates a temporary file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>tmpfile</methodname> <void/> </methodsynopsis> <para> - Creates a temporary file with a unique name in read-write (w+) mode, - returning a file handle similar to the one returned by - <function>fopen</function>. + Creates a temporary file with a unique name in read-write (w+) mode and + returns a file handle . + </para> + <para> The file is automatically removed when closed (using <function>fclose</function>), or when the script ends. </para> @@ -24,6 +25,18 @@ <literal>tmpfile(3)</literal> function, as well as the <filename>stdio.h</filename> header file. </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a file handle, similar to the one returned by + <function>fopen</function>, for the new file, or &false; on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>tmpfile</function> example</title> @@ -46,10 +59,18 @@ </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>tempnam</function>, <function>sys_get_temp_dir</function>. + <simplelist> + <member><function>tempnam</function></member> + <member><function>sys_get_temp_dir</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/unlink.xml?r1=1.10&r2=1.11&diff_format=u Index: phpdoc/en/reference/filesystem/functions/unlink.xml diff -u phpdoc/en/reference/filesystem/functions/unlink.xml:1.10 phpdoc/en/reference/filesystem/functions/unlink.xml:1.11 --- phpdoc/en/reference/filesystem/functions/unlink.xml:1.10 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/unlink.xml Sat Jun 16 01:17:14 2007 @@ -1,34 +1,89 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.11 $ --> <refentry id="function.unlink"> <refnamediv> <refname>unlink</refname> <refpurpose>Deletes a file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>unlink</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam> </methodsynopsis> <para> - Deletes <parameter>filename</parameter>. Similar to the Unix C - unlink() function. &return.success; + Deletes <parameter>filename</parameter>. Similar to the Unix C unlink() + function. </para> - <note> - <simpara> - As of PHP 5.0.0 <function>unlink</function> can also be - used with <emphasis>some</emphasis> URL wrappers. Refer to <xref linkend="wrappers"/> - for a listing of which wrappers support <function>unlink</function>. - </simpara> - </note> - ¬e.context-support; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>context</parameter></term> + <listitem> + ¬e.context-support; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - See also <function>rmdir</function> for removing directories. + &return.success; </para> </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + As of PHP 5.0.0 <function>unlink</function> can also be used with + <emphasis>some</emphasis> URL wrappers. Refer to <xref + linkend="wrappers"/> for a listing of which wrappers support + <function>unlink</function>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>rmdir</function> for removing directories</member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/chgrp.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filesystem/functions/chgrp.xml diff -u phpdoc/en/reference/filesystem/functions/chgrp.xml:1.7 phpdoc/en/reference/filesystem/functions/chgrp.xml:1.8 --- phpdoc/en/reference/filesystem/functions/chgrp.xml:1.7 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/chgrp.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.chgrp"> <refnamediv> <refname>chgrp</refname> <refpurpose>Changes file group</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>chgrp</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -15,20 +15,61 @@ </methodsynopsis> <para> Attempts to change the group of the file <parameter>filename</parameter> - to <parameter>group</parameter> (specified by name or number). Only the - superuser may change the group of a file arbitrarily; other users may - change the group of a file to any group of which that user is a member. + to <parameter>group</parameter>. </para> <para> + Only the superuser may change the group of a file arbitrarily; other users + may change the group of a file to any group of which that user is a member. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>group</parameter></term> + <listitem> + <para> + A group name or number. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> &return.success; </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; ¬e.sm.uidcheck; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>chown</function> and - <function>chmod</function>. + <simplelist> + <member><function>chown</function></member> + <member><function>chmod</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/chown.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/filesystem/functions/chown.xml diff -u phpdoc/en/reference/filesystem/functions/chown.xml:1.8 phpdoc/en/reference/filesystem/functions/chown.xml:1.9 --- phpdoc/en/reference/filesystem/functions/chown.xml:1.8 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/chown.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.chown"> <refnamediv> <refname>chown</refname> <refpurpose>Changes file owner</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>chown</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -15,18 +15,57 @@ </methodsynopsis> <para> Attempts to change the owner of the file <parameter>filename</parameter> - to user <parameter>user</parameter> (specified by name or number). Only - the superuser may change the owner of a file. + to user <parameter>user</parameter>. Only the superuser may change the + owner of a file. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>user</parameter></term> + <listitem> + <para> + A user name or number. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; ¬e.sm.uidcheck; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>chmod</function>. + <simplelist> + <member><function>chmod</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/copy.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/reference/filesystem/functions/copy.xml diff -u phpdoc/en/reference/filesystem/functions/copy.xml:1.14 phpdoc/en/reference/filesystem/functions/copy.xml:1.15 --- phpdoc/en/reference/filesystem/functions/copy.xml:1.14 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/copy.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.15 $ --> <refentry id="function.copy"> <refnamediv> <refname>copy</refname> <refpurpose>Copies file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>copy</methodname> <methodparam><type>string</type><parameter>source</parameter></methodparam> @@ -15,7 +15,80 @@ </methodsynopsis> <para> Makes a copy of the file <parameter>source</parameter> to - <parameter>dest</parameter>. &return.success; + <parameter>dest</parameter>. + </para> + <para> + If you wish to move a file, use the <function>rename</function> function. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>source</parameter></term> + <listitem> + <para> + Path to the source file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>dest</parameter></term> + <listitem> + <para> + The destination path. If <parameter>dest</parameter> is a URL, the + copy operation may fail if the wrapper does not support overwriting of + existing files. + </para> + <warning> + <para> + If the destination file already exists, it will be overwritten. + </para> + </warning> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.3.0</entry> + <entry> + Both <parameter>source</parameter> and <parameter>dest</parameter> + may now be URLs if the "fopen wrappers" have been enabled. + See <function>fopen</function> for more details. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> <example> <title><function>copy</function> example</title> <programlisting role="php"> @@ -32,37 +105,31 @@ </programlisting> </example> </para> - <para> - If you wish to move a file, use the <function>rename</function> function. - </para> - <note> - <para> - As of PHP 4.3.0, both <parameter>source</parameter> and - <parameter>dest</parameter> may be URLs if the "fopen wrappers" - have been enabled. See <function>fopen</function> for more details. - If <parameter>dest</parameter> is a URL, the copy operation may - fail if the wrapper does not support overwriting of existing files. - </para> - </note> - <warning> - <para> - If the destination file already exists, it will be overwritten. - </para> - </warning> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <note> <para> Windows compatibility: If you copy a file with no size, - <function>copy</function> will return &false;, but the file will be correctly - copied. + <function>copy</function> will return &false;, but the file will be + correctly copied. </para> </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>move_uploaded_file</function>, - <function>rename</function>, and the section of the manual - about <link linkend="features.file-upload">handling file - uploads</link>. + <simplelist> + <member><function>move_uploaded_file</function></member> + <member><function>rename</function></member> + <member>The section of the manual about <link + linkend="features.file-upload">handling file uploads</link></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/delete.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/filesystem/functions/delete.xml diff -u phpdoc/en/reference/filesystem/functions/delete.xml:1.5 phpdoc/en/reference/filesystem/functions/delete.xml:1.6 --- phpdoc/en/reference/filesystem/functions/delete.xml:1.5 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/delete.xml Sat Jun 16 01:17:14 2007 @@ -1,27 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.delete"> <refnamediv> <refname>delete</refname> <refpurpose>See <function>unlink</function> or <function>unset</function></refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>void</type><methodname>delete</methodname> - <methodparam><type>string</type><parameter>file</parameter></methodparam> + <void/> </methodsynopsis> <para> - This is a dummy manual entry to satisfy those people who are - looking for <function>unlink</function> or - <function>unset</function> in the wrong place. + This is a dummy manual entry to satisfy those people who are looking for + <function>unlink</function> or <function>unset</function> in the wrong + place. </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - See also <function>unlink</function> to delete files, - <function>unset</function> to delete variables. + &return.void; </para> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>unlink</function> to delete files</member> + <member><function>unset</function> to delete variables</member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/disk-free-space.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/filesystem/functions/disk-free-space.xml diff -u phpdoc/en/reference/filesystem/functions/disk-free-space.xml:1.5 phpdoc/en/reference/filesystem/functions/disk-free-space.xml:1.6 --- phpdoc/en/reference/filesystem/functions/disk-free-space.xml:1.5 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/disk-free-space.xml Sat Jun 16 01:17:14 2007 @@ -1,22 +1,49 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.86 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.disk-free-space"> <refnamediv> <refname>disk_free_space</refname> <refpurpose>Returns available space in directory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>float</type><methodname>disk_free_space</methodname> <methodparam><type>string</type><parameter>directory</parameter></methodparam> </methodsynopsis> <para> - Given a string containing a directory, this function will return - the number of bytes available on the corresponding filesystem or - disk partition. + Given a string containing a directory, this function will return the + number of bytes available on the corresponding filesystem or disk + partition. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>directory</parameter></term> + <listitem> + <para> + A directory of the filesystem or disk partition. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the number of available bytes as a float. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>disk_free_space</function> example</title> @@ -34,13 +61,22 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; + </refsect1> - <simpara> - See also <function>disk_total_space</function> - </simpara> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>disk_total_space</function></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/disk-total-space.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/filesystem/functions/disk-total-space.xml diff -u phpdoc/en/reference/filesystem/functions/disk-total-space.xml:1.5 phpdoc/en/reference/filesystem/functions/disk-total-space.xml:1.6 --- phpdoc/en/reference/filesystem/functions/disk-total-space.xml:1.5 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/disk-total-space.xml Sat Jun 16 01:17:14 2007 @@ -1,22 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.64 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.disk-total-space"> <refnamediv> <refname>disk_total_space</refname> <refpurpose>Returns the total size of a directory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>float</type><methodname>disk_total_space</methodname> <methodparam><type>string</type><parameter>directory</parameter></methodparam> </methodsynopsis> <para> - Given a string containing a directory, this function will return - the total number of bytes on the corresponding filesystem or disk - partition. + Given a string containing a directory, this function will return the total + number of bytes on the corresponding filesystem or disk partition. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>directory</parameter></term> + <listitem> + <para> + A directory of the filesystem or disk partition. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the total number of bytes as a float. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>disk_total_space</function> example</title> @@ -34,13 +60,22 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; + </refsect1> - <simpara> - See also <function>disk_free_space</function> - </simpara> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>disk_free_space</function></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/diskfreespace.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/filesystem/functions/diskfreespace.xml diff -u phpdoc/en/reference/filesystem/functions/diskfreespace.xml:1.5 phpdoc/en/reference/filesystem/functions/diskfreespace.xml:1.6 --- phpdoc/en/reference/filesystem/functions/diskfreespace.xml:1.5 Mon Apr 25 16:17:01 2005 +++ phpdoc/en/reference/filesystem/functions/diskfreespace.xml Sat Jun 16 01:17:14 2007 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.diskfreespace"> <refnamediv> <refname>diskfreespace</refname> @@ -14,6 +13,7 @@ <function>disk_free_space</function>. </simpara> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fclose.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fclose.xml diff -u phpdoc/en/reference/filesystem/functions/fclose.xml:1.6 phpdoc/en/reference/filesystem/functions/fclose.xml:1.7 --- phpdoc/en/reference/filesystem/functions/fclose.xml:1.6 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fclose.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.fclose"> <refnamediv> <refname>fclose</refname> <refpurpose>Closes an open file pointer</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>fclose</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> @@ -15,14 +15,34 @@ <para> The file pointed to by <parameter>handle</parameter> is closed. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - &return.success; + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <para> + The file pointer must be valid, and must point to a file successfully + opened by <function>fopen</function> or <function>fsockopen</function>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - The file pointer must be valid, and must point to a file - successfully opened by <function>fopen</function> or - <function>fsockopen</function>. + &return.success; </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>A simple <function>fclose</function> example</title> @@ -30,9 +50,9 @@ <![CDATA[ <?php - $handle = fopen('somefile.txt', 'r'); +$handle = fopen('somefile.txt', 'r'); - fclose($handle); +fclose($handle); ?> ]]> @@ -40,6 +60,17 @@ </example> </para> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>fopen</function></member> + <member><function>fsockopen</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/feof.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/reference/filesystem/functions/feof.xml diff -u phpdoc/en/reference/filesystem/functions/feof.xml:1.14 phpdoc/en/reference/filesystem/functions/feof.xml:1.15 --- phpdoc/en/reference/filesystem/functions/feof.xml:1.14 Fri Jun 15 19:45:56 2007 +++ phpdoc/en/reference/filesystem/functions/feof.xml Sat Jun 16 01:17:14 2007 @@ -1,21 +1,46 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.15 $ --> <refentry id="function.feof"> <refnamediv> <refname>feof</refname> <refpurpose>Tests for end-of-file on a file pointer</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>feof</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> + Tests for end-of-file on a file pointer. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + &fs.validfp.all; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns &true; if the file pointer is at EOF or an error occurs (including socket timeout); otherwise returns &false;. </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <warning> <simpara> If a connection opened by <function>fsockopen</function> wasn't closed @@ -25,7 +50,6 @@ value. </simpara> </warning> - &fs.validfp.all; <warning> <para> If passed file pointer is not valid you may get an infinite loop, because @@ -50,6 +74,7 @@ </para> </warning> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fflush.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fflush.xml diff -u phpdoc/en/reference/filesystem/functions/fflush.xml:1.7 phpdoc/en/reference/filesystem/functions/fflush.xml:1.8 --- phpdoc/en/reference/filesystem/functions/fflush.xml:1.7 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fflush.xml Sat Jun 16 01:17:14 2007 @@ -1,24 +1,44 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.43 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.fflush"> <refnamediv> <refname>fflush</refname> <refpurpose>Flushes the output to a file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>fflush</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> - This function forces a write of all buffered output to the - resource pointed to by the file handle <parameter>handle</parameter>. + This function forces a write of all buffered output to the resource + pointed to by the file <parameter>handle</parameter>. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + &fs.validfp.all; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> &return.success; </para> - &fs.validfp.all; </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fgetcsv.xml?r1=1.21&r2=1.22&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.21 phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.22 --- phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.21 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fgetcsv.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.22 $ --> <refentry id="function.fgetcsv"> <refnamediv> <refname>fgetcsv</refname> <refpurpose>Gets line from file pointer and parse for CSV fields</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>fgetcsv</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> @@ -15,65 +15,112 @@ <methodparam choice="opt"><type>string</type><parameter>delimiter</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>enclosure</parameter></methodparam> </methodsynopsis> + <para> + Similar to <function>fgets</function> except that + <function>fgetcsv</function> parses the line it reads for fields in + <acronym>CSV</acronym> format and returns an array containing the fields + read. + </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>handle</parameter></term> <listitem> - <simpara> - A valid file pointer to a file successfully opened by <function>fopen</function>, - <function>popen</function>, or <function>fsockopen</function>. - </simpara> + <para> + A valid file pointer to a file successfully opened by + <function>fopen</function>, <function>popen</function>, or + <function>fsockopen</function>. + </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>length</parameter> (Optional)</term> + <term><parameter>length</parameter></term> <listitem> - <simpara> - Must be greater than the longest line (in characters) to be found in the CSV file - (allowing for trailing line-end characters). It became optional in PHP 5. Omitting - this parameter (or setting it to 0 in PHP 5.0.4 and later) the maximum line length - is not limited, which is slightly slower. - </simpara> + <para> + Must be greater than the longest line (in characters) to be found in + the CSV file (allowing for trailing line-end characters). It became + optional in PHP 5. Omitting this parameter (or setting it to 0 in PHP + 5.0.4 and later) the maximum line length is not limited, which is + slightly slower. + </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>delimiter</parameter> (Optional)</term> + <term><parameter>delimiter</parameter></term> <listitem> - <simpara> + <para> Set the field delimiter (one character only). Defaults as a comma. - </simpara> + </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>enclosure</parameter> (Optional)</term> + <term><parameter>enclosure</parameter></term> <listitem> - <simpara> - Set the field enclosure character (one character only). Defaults as a double quotation mark. Added in PHP 4.3.0. - </simpara> + <para> + Set the field enclosure character (one character only). Defaults as a + double quotation mark. + </para> </listitem> </varlistentry> </variablelist> </para> + </refsect1> - <simpara> - Similar to <function>fgets</function> except that - <function>fgetcsv</function> parses the line it reads for fields - in <acronym>CSV</acronym> format and returns an array containing - the fields read. - </simpara> - <simpara> - <function>fgetcsv</function> returns &false; on error, including - end of file. - </simpara> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns an indexed array containing the fields read. + </para> <note> - <simpara> + <para> A blank line in a CSV file will be returned as an array comprising a single <type>null</type> field, and will not be treated as an error. - </simpara> + </para> </note> + ¬e.line-endings; + <para> + <function>fgetcsv</function> returns &false; on error, including end of + file. + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.3.5</entry> + <entry> + <function>fgetcsv</function> is now binary safe + </entry> + </row> + <row> + <entry>4.3.0</entry> + <entry> + The <parameter>enclosure</parameter> parameter was added + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Read and print the entire contents of a CSV file</title> @@ -96,22 +143,31 @@ </programlisting> </example> </para> - <para> - <function>fgetcsv</function> has been binary safe since PHP 4.3.5 - </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <note> - <simpara> + <para> Locale setting is taken into account by this function. If <varname>LANG</varname> is e.g. <literal>en_US.UTF-8</literal>, files in one-byte encoding are read wrong by this function. - </simpara> + </para> </note> - ¬e.line-endings; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>explode</function>, <function>file</function>, - <function>pack</function> and <function>fputcsv</function>. + <simplelist> + <member><function>explode</function></member> + <member><function>file</function></member> + <member><function>pack</function></member> + <member><function>fputcsv</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fgets.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fgets.xml diff -u phpdoc/en/reference/filesystem/functions/fgets.xml:1.17 phpdoc/en/reference/filesystem/functions/fgets.xml:1.18 --- phpdoc/en/reference/filesystem/functions/fgets.xml:1.17 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fgets.xml Sat Jun 16 01:17:14 2007 @@ -1,41 +1,100 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.18 $ --> <refentry id="function.fgets"> <refnamediv> <refname>fgets</refname> <refpurpose>Gets line from file pointer</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>fgets</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> + Gets a line from file pointer. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + &fs.validfp.all; + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>length</parameter></term> + <listitem> + <para> + Reading ends when <parameter>length</parameter> - 1 bytes have been + read, on a newline (which is included in the return value), or on EOF + (whichever comes first). If no length is specified, it will keep + reading from the stream until it reaches the end of the line. + </para> + <note> + <para> + Until PHP 4.3.0, omitting it would assume 1024 as the line length. + If the majority of the lines in the file are all larger than 8KB, + it is more resource efficient for your script to specify the maximum + line length. + </para> + </note> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns a string of up to <parameter>length</parameter> - 1 bytes read from - the file pointed to by <parameter>handle</parameter>. Reading ends when - <parameter>length</parameter> - 1 bytes have been read, on a newline (which is - included in the return value), or on EOF (whichever comes first). If no length - is specified, it will keep reading from the stream until it reaches - the end of the line. + the file pointed to by <parameter>handle</parameter>. </para> <para> If an error occurs, returns &false;. </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; <para> - Common Pitfalls: + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.3.0</entry> + <entry> + <function>fgets</function> is now binary safe + </entry> + </row> + <row> + <entry>4.2.0</entry> + <entry> + The <parameter>length</parameter> parameter became optional + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> - <simpara> - People used to the 'C' semantics of <function>fgets</function> - should note the difference in how <literal>EOF</literal> is returned. - </simpara> - - &fs.validfp.all; + </refsect1> + <refsect1 role="examples"> + &reftitle.examples; <para> - A simple example follows: <example> <title>Reading a file line by line</title> <programlisting role="php"> @@ -54,33 +113,35 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + ¬e.line-endings; <note> - <simpara> - The <parameter>length</parameter> parameter became optional in PHP - 4.2.0. Until PHP 4.3.0, omitting it would assume 1024 as the line length. - If the majority of the lines in the file are all larger than 8KB, - it is more resource efficient for your script to specify the maximum - line length. - </simpara> - </note> - <note> - <simpara> - This function is binary safe as of PHP 4.3. Earlier versions - were not binary safe. - </simpara> + <para> + People used to the 'C' semantics of <function>fgets</function> + should note the difference in how <literal>EOF</literal> is returned. + </para> </note> - ¬e.line-endings; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>fgetss</function> - <function>fread</function>, - <function>fgetc</function>, - <function>stream_get_line</function>, - <function>fopen</function>, - <function>popen</function>, - <function>fsockopen</function>, and - <function>stream_set_timeout</function>. + <simplelist> + <member><function>fgetss</function></member> + <member><function>fread</function></member> + <member><function>fgetc</function></member> + <member><function>stream_get_line</function></member> + <member><function>fopen</function></member> + <member><function>popen</function></member> + <member><function>fsockopen</function></member> + <member><function>stream_set_timeout</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/file-exists.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc/en/reference/filesystem/functions/file-exists.xml diff -u phpdoc/en/reference/filesystem/functions/file-exists.xml:1.17 phpdoc/en/reference/filesystem/functions/file-exists.xml:1.18 --- phpdoc/en/reference/filesystem/functions/file-exists.xml:1.17 Fri Jun 15 19:45:56 2007 +++ phpdoc/en/reference/filesystem/functions/file-exists.xml Sat Jun 16 01:17:14 2007 @@ -1,26 +1,67 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.18 $ --> <refentry id="function.file-exists"> <refnamediv> <refname>file_exists</refname> <refpurpose>Checks whether a file or directory exists</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>file_exists</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> - <simpara> + <para> + Checks whether a file or directory exists. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file or directory. + </para> + <para> + On windows, use <filename>//computername/share/filename</filename> or + <filename>\\computername\share\filename</filename> to check files on + network shares. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns &true; if the file or directory specified by <parameter>filename</parameter> exists; &false; otherwise. - </simpara> - <para> - On windows, use <filename>//computername/share/filename</filename> or - <filename>\\computername\share\filename</filename> to check files on - network shares. </para> + <warning> + <para> + This function returns &false; for files inaccessible due to <link + linkend="features.safe-mode">safe mode</link> restrictions. However these + files still can be <link linkend="function.include">included</link> if + they are located in <link + linkend="ini.safe-mode-include-dir">safe_mode_include_dir</link>. + </para> + </warning> + <note> + <para> + The check is done using the real UID/GID instead of the effective one. + </para> + </note> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Testing whether a file exists</title> @@ -39,32 +80,26 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.clearstatcache; - &tip.fopen-wrapper.stat; + </refsect1> - <warning> - <para> - This function returns &false; for files inaccessible due to <link - linkend="features.safe-mode">safe mode</link> restrictions. However these - files still can be <link linkend="function.include">included</link> if - they are located in <link - linkend="ini.safe-mode-include-dir">safe_mode_include_dir</link>. - </para> - </warning> - - <note> - <para> - The check is done using the real UID/GID instead of the effective one. - </para> - </note> - + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>is_readable</function>, <function>is_writable</function>, - <function>is_file</function> and <function>file</function>. + <simplelist> + <member><function>is_readable</function></member> + <member><function>is_writable</function></member> + <member><function>is_file</function></member> + <member><function>file</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/file-put-contents.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc/en/reference/filesystem/functions/file-put-contents.xml diff -u phpdoc/en/reference/filesystem/functions/file-put-contents.xml:1.13 phpdoc/en/reference/filesystem/functions/file-put-contents.xml:1.14 --- phpdoc/en/reference/filesystem/functions/file-put-contents.xml:1.13 Fri Jun 15 19:45:56 2007 +++ phpdoc/en/reference/filesystem/functions/file-put-contents.xml Sat Jun 16 01:17:14 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <refentry id="function.file-put-contents"> <refnamediv> <refname>file_put_contents</refname> @@ -15,21 +15,15 @@ <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam> </methodsynopsis> - <simpara> + <para> Identical to calling <function>fopen</function>, <function>fwrite</function>, and <function>fclose</function> successively. - </simpara> + </para> <para> You can also specify the <parameter>data</parameter> parameter as an array (not multi-dimension arrays). This is equivalent to <literal>file_put_contents($filename, implode('', $array))</literal>. </para> - <para> - As of PHP 5.1.0, you may also pass a stream resource to the - <parameter>data</parameter> parameter. In result, the remaining buffer of - that stream will be copied to the specified file. This is similar with - using <function>stream_copy_to_stream</function>. - </para> </refsect1> <refsect1 role="parameters"> @@ -51,6 +45,11 @@ The data to write. Can be either a <type>string</type>, an <type>array</type> or a <type>stream</type> resource (explained above). </para> + <para> + If <parameter>data</parameter> is a <type>stream</type> resource, the + remaining buffer of that stream will be copied to the specified file. + This is similar with using <function>stream_copy_to_stream</function>. + </para> </listitem> </varlistentry> <varlistentry> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/file.xml?r1=1.21&r2=1.22&diff_format=u Index: phpdoc/en/reference/filesystem/functions/file.xml diff -u phpdoc/en/reference/filesystem/functions/file.xml:1.21 phpdoc/en/reference/filesystem/functions/file.xml:1.22 --- phpdoc/en/reference/filesystem/functions/file.xml:1.21 Tue Apr 3 20:38:29 2007 +++ phpdoc/en/reference/filesystem/functions/file.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.22 $ --> <refentry id="function.file"> <refnamediv> <refname>file</refname> <refpurpose>Reads entire file into an array</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>file</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -15,57 +15,144 @@ <methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam> </methodsynopsis> <para> - Similiar to <function>file_get_contents</function>, except that - <function>file</function> returns the file in an array. Each - element of the array corresponds to a line in the file, with the - newline still attached. Upon failure, <function>file</function> - returns &false;. + Reads an entire file into an array. </para> + <note> + <para> + You can use <function>file_get_contents</function> to return the contents + of a file as a string. + </para> + </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - The optional parameter <parameter>flags</parameter> can be one, or more, of - the following constants: <variablelist> <varlistentry> - <term> - <constant>FILE_USE_INCLUDE_PATH</constant> - </term> + <term><parameter>filename</parameter></term> <listitem> - <simpara> - Search for the file in the <link linkend="ini.include-path">include_path</link>. - </simpara> + <para> + Path to the file. + </para> + &tip.fopen-wrapper; </listitem> </varlistentry> <varlistentry> - <term> - <constant>FILE_IGNORE_NEW_LINES</constant> - </term> + <term><parameter>flags</parameter></term> <listitem> - <simpara> - Do not add newline at the end of each array element - </simpara> + <para> + The optional parameter <parameter>flags</parameter> can be one, or + more, of the following constants: + <variablelist> + <varlistentry> + <term> + <constant>FILE_USE_INCLUDE_PATH</constant> + </term> + <listitem> + <simpara> + Search for the file in the <link + linkend="ini.include-path">include_path</link>. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term> + <constant>FILE_IGNORE_NEW_LINES</constant> + </term> + <listitem> + <simpara> + Do not add newline at the end of each array element + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term> + <constant>FILE_SKIP_EMPTY_LINES</constant> + </term> + <listitem> + <simpara> + Skip empty lines + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> </listitem> </varlistentry> <varlistentry> - <term> - <constant>FILE_SKIP_EMPTY_LINES</constant> - </term> + <term><parameter>context</parameter></term> <listitem> - <simpara> - Skip empty lines - </simpara> + <para> + ¬e.context-support; + </para> </listitem> </varlistentry> </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the file in an array. Each element of the array corresponds to a + line in the file, with the newline still attached. Upon failure, + <function>file</function> returns &false;. + </para> <note> <para> - Prior to PHP 5.0.0 the <parameter>flags</parameter> parameter only - covered <link linkend="ini.include-path">include_path</link> and was - enabled with 1. + Each line in the resulting array will include the line ending, unless + <constant>FILE_IGNORE_NEW_LINES</constant> is used, so you still need to + use <function>rtrim</function> if you do not want the line ending + present. </para> </note> + ¬e.line-endings; + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + The <parameter>context</parameter> parameter was added + </entry> + </row> + <row> + <entry>5.0.0</entry> + <entry> + Prior to PHP 5.0.0 the <parameter>flags</parameter> parameter only + covered <link linkend="ini.include-path">include_path</link> and was + enabled with 1 + </entry> + </row> + <row> + <entry>4.3.0</entry> + <entry> + <function>file</function> became binary safe + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> - <informalexample> + <example> + <title><function>file</function> example</title> <programlisting role="php"> <![CDATA[ <?php @@ -83,36 +170,30 @@ ?> ]]> </programlisting> - </informalexample> + </example> </para> - &tip.fopen-wrapper; - <note> - <para> - Each line in the resulting array will include the line ending, unless FILE_IGNORE_NEW_LINES is used, so you - still need to use <function>rtrim</function> if you do not want the line - ending present. - </para> - </note> - ¬e.line-endings; - <note> - <para> - As of PHP 4.3.0 you can use <function>file_get_contents</function> to - return the contents of a file as a string. - </para> - <para> - In PHP 4.3.0 <function>file</function> became binary safe. - </para> - </note> - ¬e.context-support; + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; &warn.ssl-non-standard; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>readfile</function>, - <function>fopen</function>, <function>fsockopen</function>, - <function>popen</function>, <function>file_get_contents</function>, - <function>include</function>, and - <function>stream_context_create</function> + <simplelist> + <member><function>readfile</function></member> + <member><function>fopen</function></member> + <member><function>fsockopen</function></member> + <member><function>popen</function></member> + <member><function>file_get_contents</function></member> + <member><function>include</function></member> + <member><function>stream_context_create</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/filectime.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/filesystem/functions/filectime.xml diff -u phpdoc/en/reference/filesystem/functions/filectime.xml:1.9 phpdoc/en/reference/filesystem/functions/filectime.xml:1.10 --- phpdoc/en/reference/filesystem/functions/filectime.xml:1.9 Fri Jun 15 19:45:56 2007 +++ phpdoc/en/reference/filesystem/functions/filectime.xml Sat Jun 16 01:17:14 2007 @@ -1,40 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.filectime"> <refnamediv> <refname>filectime</refname> <refpurpose>Gets inode change time of file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>filectime</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns the time the file was last changed, or &false; in case of - an error. The time is returned as a Unix timestamp. + Gets the inode change time of a file. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - Note: In most Unix filesystems, a file is considered - changed when its inode data is changed; that is, when - the permissions, owner, group, or other metadata - from the inode is updated. See also - <function>filemtime</function> (which is what you want to use - when you want to create "Last Modified" footers on web pages) and - <function>fileatime</function>. + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - Note also that in some Unix texts the ctime of a file is - referred to as being the creation time of the file. This is wrong. - There is no creation time for Unix files in most Unix filesystems. + Returns the time the file was last changed, or &false; in case of + an error. The time is returned as a Unix timestamp. </para> + </refsect1> - ¬e.clearstatcache; - - &tip.fopen-wrapper.stat; - + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>A <function>filectime</function> example</title> @@ -54,10 +62,40 @@ </programlisting> </example> </para> - <simpara> - See also <function>filemtime</function> - </simpara> </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + Note: In most Unix filesystems, a file is considered changed when its + inode data is changed; that is, when the permissions, owner, group, or + other metadata from the inode is updated. See also + <function>filemtime</function> (which is what you want to use when you + want to create "Last Modified" footers on web pages) and + <function>fileatime</function>. + </para> + </note> + <note> + <para> + Note also that in some Unix texts the ctime of a file is referred to as + being the creation time of the file. This is wrong. There is no creation + time for Unix files in most Unix filesystems. + </para> + </note> + ¬e.clearstatcache; + &tip.fopen-wrapper.stat; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>filemtime</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/filegroup.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filesystem/functions/filegroup.xml diff -u phpdoc/en/reference/filesystem/functions/filegroup.xml:1.7 phpdoc/en/reference/filesystem/functions/filegroup.xml:1.8 --- phpdoc/en/reference/filesystem/functions/filegroup.xml:1.7 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/filegroup.xml Sat Jun 16 01:17:14 2007 @@ -1,34 +1,72 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.filegroup"> <refnamediv> <refname>filegroup</refname> <refpurpose>Gets file group</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>filegroup</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> + Gets the file group. The group ID is returned in numerical format, use + <function>posix_getgrgid</function> to resolve it to a group name. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns the group ID of the file, or &false; in case of an error. The group ID is returned in numerical format, use <function>posix_getgrgid</function> to resolve it to a group name. - Upon failure, &false; is returned along with an error of level - <constant>E_WARNING</constant>. + Upon failure, &false; is returned. </para> + </refsect1> - ¬e.clearstatcache; + <refsect1 role="errors"> + &reftitle.errors; + <para> + Upon failure, an <constant>E_WARNING</constant> is emitted. + </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; &tip.fopen-wrapper.stat; + </refsect1> - <simpara> - See also <function>fileowner</function>, and - <link linkend="ini.safe-mode-gid">safe_mode_gid</link>. - </simpara> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>fileowner</function></member> + <member><link linkend="ini.safe-mode-gid">safe_mode_gid</link></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fileinode.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fileinode.xml diff -u phpdoc/en/reference/filesystem/functions/fileinode.xml:1.6 phpdoc/en/reference/filesystem/functions/fileinode.xml:1.7 --- phpdoc/en/reference/filesystem/functions/fileinode.xml:1.6 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fileinode.xml Sat Jun 16 01:17:14 2007 @@ -1,30 +1,60 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.fileinode"> <refnamediv> <refname>fileinode</refname> <refpurpose>Gets file inode</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>fileinode</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns the inode number of the file, or &false; in case of an - error. + Gets the file inode. </para> + </refsect1> - ¬e.clearstatcache; + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the inode number of the file, or &false; in case of an error. + </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; &tip.fopen-wrapper.stat; + </refsect1> - <simpara> - See also <function>stat</function> - </simpara> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>stat</function></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/filemtime.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filesystem/functions/filemtime.xml diff -u phpdoc/en/reference/filesystem/functions/filemtime.xml:1.6 phpdoc/en/reference/filesystem/functions/filemtime.xml:1.7 --- phpdoc/en/reference/filesystem/functions/filemtime.xml:1.6 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/filemtime.xml Sat Jun 16 01:17:14 2007 @@ -1,32 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.filemtime"> <refnamediv> <refname>filemtime</refname> <refpurpose>Gets file modification time</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>filemtime</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns the time the file was last modified, or &false; in case of - an error. The time is returned as a Unix timestamp, which is - suitable for the <function>date</function> function. + This function returns the time when the data blocks of a file were being + written to, that is, the time when the content of the file was changed. </para> + </refsect1> - ¬e.clearstatcache; - - &tip.fopen-wrapper.stat; + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - This function returns the time when the data - blocks of a file were being written to, that is, the time - when the content of the file was changed. + Returns the time the file was last modified, or &false; in case of + an error. The time is returned as a Unix timestamp, which is + suitable for the <function>date</function> function. </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>filemtime</function> example</title> @@ -44,11 +62,26 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; + &tip.fopen-wrapper.stat; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>filectime</function>, <function>stat</function>, - <function>touch</function>, and <function>getlastmod</function>. + <simplelist> + <member><function>filectime</function></member> + <member><function>stat</function></member> + <member><function>touch</function></member> + <member><function>getlastmod</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fileowner.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fileowner.xml diff -u phpdoc/en/reference/filesystem/functions/fileowner.xml:1.6 phpdoc/en/reference/filesystem/functions/fileowner.xml:1.7 --- phpdoc/en/reference/filesystem/functions/fileowner.xml:1.6 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fileowner.xml Sat Jun 16 01:17:14 2007 @@ -1,32 +1,62 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.fileowner"> <refnamediv> <refname>fileowner</refname> <refpurpose>Gets file owner</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>fileowner</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> + Gets the file owner. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns the user ID of the owner of the file, or &false; in case of an error. The user ID is returned in numerical format, use <function>posix_getpwuid</function> to resolve it to a username. </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.clearstatcache; - &tip.fopen-wrapper.stat; + </refsect1> - <simpara> - See also <function>stat</function> - </simpara> - + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>stat</function></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fileperms.xml?r1=1.11&r2=1.12&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fileperms.xml diff -u phpdoc/en/reference/filesystem/functions/fileperms.xml:1.11 phpdoc/en/reference/filesystem/functions/fileperms.xml:1.12 --- phpdoc/en/reference/filesystem/functions/fileperms.xml:1.11 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fileperms.xml Sat Jun 16 01:17:14 2007 @@ -1,45 +1,69 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.12 $ --> <refentry id="function.fileperms"> <refnamediv> <refname>fileperms</refname> <refpurpose>Gets file permissions</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>fileperms</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> + Gets permissions for the given file. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns the permissions on the file, or &false; in case of an error. </para> - ¬e.clearstatcache; - &tip.fopen-wrapper.stat; - <example> - <title>Display permissions as an octal value</title> - <programlisting role="php"> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Display permissions as an octal value</title> + <programlisting role="php"> <![CDATA[ <?php echo substr(sprintf('%o', fileperms('/tmp')), -4); echo substr(sprintf('%o', fileperms('/etc/passwd')), -4); ?> ]]> - </programlisting> - <para> - This would produce the output: - </para> - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ 1777 0644 ]]> - </screen> - </example> - <example> - <title>Display full permissions</title> - <programlisting role="php"> + </screen> + </example> + <example> + <title>Display full permissions</title> + <programlisting role="php"> <![CDATA[ <?php $perms = fileperms('/etc/passwd'); @@ -94,21 +118,33 @@ echo $info; ?> ]]> - </programlisting> - <para> - This would produce the output: - </para> - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ -rw-r--r-- ]]> - </screen> - </example> - <simpara> - See also <function>is_readable</function>, - and <function>stat</function> - </simpara> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; + &tip.fopen-wrapper.stat; </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>is_readable</function></member> + <member><function>stat</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/filesize.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/filesystem/functions/filesize.xml diff -u phpdoc/en/reference/filesystem/functions/filesize.xml:1.8 phpdoc/en/reference/filesystem/functions/filesize.xml:1.9 --- phpdoc/en/reference/filesystem/functions/filesize.xml:1.8 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/filesize.xml Sat Jun 16 01:17:14 2007 @@ -1,18 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.filesize"> <refnamediv> <refname>filesize</refname> <refpurpose>Gets file size</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>filesize</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> + Gets the size for the given file. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> Returns the size of the file in bytes, or &false; (and generates an error of level <constant>E_WARNING</constant>) in case of an error. </para> @@ -24,11 +47,10 @@ be overcome by using <literal>sprintf("%u", filesize($file))</literal>. </simpara> </note> + </refsect1> - ¬e.clearstatcache; - - &tip.fopen-wrapper.stat; - + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>filesize</function> example</title> @@ -46,10 +68,23 @@ </programlisting> </example> </para> - <simpara> - See also <function>file_exists</function> - </simpara> </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; + &tip.fopen-wrapper.stat; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>file_exists</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fopen.xml?r1=1.30&r2=1.31&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fopen.xml diff -u phpdoc/en/reference/filesystem/functions/fopen.xml:1.30 phpdoc/en/reference/filesystem/functions/fopen.xml:1.31 --- phpdoc/en/reference/filesystem/functions/fopen.xml:1.30 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/fopen.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.30 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.31 $ --> <refentry id="function.fopen"> <refnamediv> <refname>fopen</refname> <refpurpose>Opens file or URL</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>fopen</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -15,209 +15,291 @@ <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam> </methodsynopsis> - <simpara> - <function>fopen</function> binds a named resource, specified - by <parameter>filename</parameter>, to a stream. If - <parameter>filename</parameter> is of the form "scheme://...", - it is assumed to be a URL and PHP will search for a protocol - handler (also known as a wrapper) for that scheme. If no - wrappers for that protocol are registered, PHP will emit - a notice to help you track potential problems in your script - and then continue as though <parameter>filename</parameter> - specifies a regular file. - </simpara> - <simpara> - If PHP has decided that <parameter>filename</parameter> specifies - a local file, then it will try to open a stream on that file. - The file must be accessible to PHP, so you need to ensure that - the file access permissions allow this access. - If you have enabled &safemode;, - or <link linkend="ini.open-basedir">open_basedir</link> further - restrictions may apply. - </simpara> - <simpara> - If PHP has decided that <parameter>filename</parameter> specifies - a registered protocol, and that protocol is registered as a - network URL, PHP will check to make sure that - <link linkend="ini.allow-url-fopen">allow_url_fopen</link> is - enabled. If it is switched off, PHP will emit a warning and - the fopen call will fail. - </simpara> - <note> - <simpara> - The list of supported protocols can be found in <xref linkend="wrappers"/>. - Some protocols (also referred to as <literal>wrappers</literal>) support - <literal>context</literal> and/or &php.ini; options. - Refer to the specific page for the protocol in use for a list of options - which can be set. (e.g. &php.ini; value - <literal>user_agent</literal> used by the <literal>http</literal> wrapper). - </simpara> - </note> - ¬e.context-support; - <note> - <simpara> - As of PHP 4.3.2, the default mode is set to binary for all - platforms that distinguish between binary and text mode. If you are - having problems with your scripts after upgrading, try using the - <literal>'t'</literal> flag as a workaround until you have made your - script more portable as mentioned below. - </simpara> - </note> <para> - The <parameter>mode</parameter> parameter specifies the type of access - you require to the stream. It may be any of the following: - <table> - <title> - A list of possible modes for <function>fopen</function> - using <parameter>mode</parameter> - </title> + <function>fopen</function> binds a named resource, specified by + <parameter>filename</parameter>, to a stream. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + If <parameter>filename</parameter> is of the form "scheme://...", it + is assumed to be a URL and PHP will search for a protocol handler + (also known as a wrapper) for that scheme. If no wrappers for that + protocol are registered, PHP will emit a notice to help you track + potential problems in your script and then continue as though + <parameter>filename</parameter> specifies a regular file. + </para> + <para> + If PHP has decided that <parameter>filename</parameter> specifies + a local file, then it will try to open a stream on that file. + The file must be accessible to PHP, so you need to ensure that + the file access permissions allow this access. + If you have enabled &safemode;, + or <link linkend="ini.open-basedir">open_basedir</link> further + restrictions may apply. + </para> + <para> + If PHP has decided that <parameter>filename</parameter> specifies + a registered protocol, and that protocol is registered as a + network URL, PHP will check to make sure that + <link linkend="ini.allow-url-fopen">allow_url_fopen</link> is + enabled. If it is switched off, PHP will emit a warning and + the fopen call will fail. + </para> + <note> + <para> + The list of supported protocols can be found in <xref + linkend="wrappers"/>. Some protocols (also referred to as + <literal>wrappers</literal>) support <literal>context</literal> + and/or &php.ini; options. Refer to the specific page for the + protocol in use for a list of options which can be set. (e.g. + &php.ini; value <literal>user_agent</literal> used by the + <literal>http</literal> wrapper). + </para> + </note> + <para> + On the Windows platform, be careful to escape any backslashes + used in the path to the file, or use forward slashes. + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +$handle = fopen("c:\\data\\info.txt", "r"); +?> +]]> + </programlisting> + </informalexample> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>mode</parameter></term> + <listitem> + <para> + The <parameter>mode</parameter> parameter specifies the type of access + you require to the stream. It may be any of the following: + <table> + <title> + A list of possible modes for <function>fopen</function> + using <parameter>mode</parameter> + </title> + <tgroup cols="2"> + <thead> + <row> + <entry><parameter>mode</parameter></entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>'r'</literal></entry> + <entry> + Open for reading only; place the file pointer at the + beginning of the file. + </entry> + </row> + <row> + <entry><literal>'r+'</literal></entry> + <entry> + Open for reading and writing; place the file pointer at + the beginning of the file. + </entry> + </row> + <row> + <entry><literal>'w'</literal></entry> + <entry> + Open for writing only; place the file pointer at the + beginning of the file and truncate the file to zero length. + If the file does not exist, attempt to create it. + </entry> + </row> + <row> + <entry><literal>'w+'</literal></entry> + <entry> + Open for reading and writing; place the file pointer at + the beginning of the file and truncate the file to zero + length. If the file does not exist, attempt to create it. + </entry> + </row> + <row> + <entry><literal>'a'</literal></entry> + <entry> + Open for writing only; place the file pointer at the end of + the file. If the file does not exist, attempt to create it. + </entry> + </row> + <row> + <entry><literal>'a+'</literal></entry> + <entry> + Open for reading and writing; place the file pointer at + the end of the file. If the file does not exist, attempt to + create it. + </entry> + </row> + <row> + <entry><literal>'x'</literal></entry> + <entry> + Create and open for writing only; place the file pointer at the + beginning of the file. If the file already exists, the + <function>fopen</function> call will fail by returning &false; and + generating an error of level <constant>E_WARNING</constant>. If + the file does not exist, attempt to create it. This is equivalent + to specifying <literal>O_EXCL|O_CREAT</literal> flags for the + underlying <literal>open(2)</literal> system call. + </entry> + </row> + <row> + <entry><literal>'x+'</literal></entry> + <entry> + Create and open for reading and writing; place the file pointer at + the beginning of the file. If the file already exists, the + <function>fopen</function> call will fail by returning &false; and + generating an error of level <constant>E_WARNING</constant>. If + the file does not exist, attempt to create it. This is equivalent + to specifying <literal>O_EXCL|O_CREAT</literal> flags for the + underlying <literal>open(2)</literal> system call. + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <note> + <para> + Different operating system families have different line-ending + conventions. When you write a text file and want to insert a line + break, you need to use the correct line-ending character(s) for your + operating system. Unix based systems use <literal>\n</literal> as the + line ending character, Windows based systems use <literal>\r\n</literal> + as the line ending characters and Macintosh based systems use + <literal>\r</literal> as the line ending character. + </para> + <para> + If you use the wrong line ending characters when writing your files, you + might find that other applications that open those files will "look + funny". + </para> + <para> + Windows offers a text-mode translation flag (<literal>'t'</literal>) + which will transparently translate <literal>\n</literal> to + <literal>\r\n</literal> when working with the file. In contrast, you + can also use <literal>'b'</literal> to force binary mode, which will not + translate your data. To use these flags, specify either + <literal>'b'</literal> or <literal>'t'</literal> as the last character + of the <parameter>mode</parameter> parameter. + </para> + <para> + The default translation mode depends on the SAPI and version of PHP that + you are using, so you are encouraged to always specify the appropriate + flag for portability reasons. You should use the <literal>'t'</literal> + mode if you are working with plain-text files and you use + <literal>\n</literal> to delimit your line endings in your script, but + expect your files to be readable with applications such as notepad. You + should use the <literal>'b'</literal> in all other cases. + </para> + <para> + If you do not specify the 'b' flag when working with binary files, you + may experience strange problems with your data, including broken image + files and strange problems with <literal>\r\n</literal> characters. + </para> + </note> + <note> + <para> + For portability, it is strongly recommended that you always + use the 'b' flag when opening files with <function>fopen</function>. + </para> + </note> + <note> + <para> + Again, for portability, it is also strongly recommended that + you re-write code that uses or relies upon the <literal>'t'</literal> + mode so that it uses the correct line endings and + <literal>'b'</literal> mode instead. + </para> + </note> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>use_include_path</parameter></term> + <listitem> + <para> + The optional third <parameter>use_include_path</parameter> parameter + can be set to '1' or &true; if you want to search for the file in the + <link linkend="ini.include-path">include_path</link>, too. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>context</parameter></term> + <listitem> + ¬e.context-support; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a file pointer resource on success, or &false; on error. + </para> + </refsect1> + + <refsect1 role="errors"> + &reftitle.errors; + <para> + If the open fails, the function an error of level + <constant>E_WARNING</constant> is generated. You may use <link + linkend="language.operators.errorcontrol">@</link> to suppress this + warning. + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> <tgroup cols="2"> <thead> <row> - <entry><parameter>mode</parameter></entry> - <entry>Description</entry> + <entry>&Version;</entry> + <entry>&Description;</entry> </row> </thead> <tbody> <row> - <entry><literal>'r'</literal></entry> + <entry>4.3.2</entry> <entry> - Open for reading only; place the file pointer at the - beginning of the file. + As of PHP 4.3.2, the default mode is set to binary for all platforms + that distinguish between binary and text mode. If you are having + problems with your scripts after upgrading, try using the + <literal>'t'</literal> flag as a workaround until you have made your + script more portable as mentioned below </entry> </row> <row> - <entry><literal>'r+'</literal></entry> + <entry>4.3.2</entry> <entry> - Open for reading and writing; place the file pointer at - the beginning of the file. - </entry> - </row> - <row> - <entry><literal>'w'</literal></entry> - <entry> - Open for writing only; place the file pointer at the - beginning of the file and truncate the file to zero length. - If the file does not exist, attempt to create it. - </entry> - </row> - <row> - <entry><literal>'w+'</literal></entry> - <entry> - Open for reading and writing; place the file pointer at - the beginning of the file and truncate the file to zero - length. If the file does not exist, attempt to create it. - </entry> - </row> - <row> - <entry><literal>'a'</literal></entry> - <entry> - Open for writing only; place the file pointer at the end of - the file. If the file does not exist, attempt to create it. - </entry> - </row> - <row> - <entry><literal>'a+'</literal></entry> - <entry> - Open for reading and writing; place the file pointer at - the end of the file. If the file does not exist, attempt to - create it. - </entry> - </row> - <row> - <entry><literal>'x'</literal></entry> - <entry> - Create and open for writing only; place the file pointer at the - beginning of the file. If the file already exists, the - <function>fopen</function> call will fail by returning &false; and - generating an error of level <constant>E_WARNING</constant>. If - the file does not exist, attempt to create it. This is equivalent - to specifying <literal>O_EXCL|O_CREAT</literal> flags for the - underlying <literal>open(2)</literal> system call. This option is - supported in PHP 4.3.2 and later, and only works for local files. - </entry> - </row> - <row> - <entry><literal>'x+'</literal></entry> - <entry> - Create and open for reading and writing; place the file pointer at - the beginning of the file. If the file already exists, the - <function>fopen</function> call will fail by returning &false; and - generating an error of level <constant>E_WARNING</constant>. If - the file does not exist, attempt to create it. This is equivalent - to specifying <literal>O_EXCL|O_CREAT</literal> flags for the - underlying <literal>open(2)</literal> system call. This option is - supported in PHP 4.3.2 and later, and only works for local files. + The <literal>'x'</literal> and <literal>'x+'</literal> option was + added </entry> </row> </tbody> </tgroup> - </table> - </para> - <note> - <para> - Different operating system families have different line-ending - conventions. When you write a text file and want to insert a line - break, you need to use the correct line-ending character(s) for your - operating system. Unix based systems use <literal>\n</literal> as the - line ending character, Windows based systems use <literal>\r\n</literal> - as the line ending characters and Macintosh based systems use - <literal>\r</literal> as the line ending character. - </para> - <para> - If you use the wrong line ending characters when writing your files, you - might find that other applications that open those files will "look - funny". - </para> - <para> - Windows offers a text-mode translation flag (<literal>'t'</literal>) - which will transparently translate <literal>\n</literal> to - <literal>\r\n</literal> when working with the file. In contrast, you - can also use <literal>'b'</literal> to force binary mode, which will not - translate your data. To use these flags, specify either - <literal>'b'</literal> or <literal>'t'</literal> as the last character - of the <parameter>mode</parameter> parameter. - </para> - <para> - The default translation mode depends on the SAPI and version of PHP that - you are using, so you are encouraged to always specify the appropriate - flag for portability reasons. You should use the <literal>'t'</literal> - mode if you are working with plain-text files and you use - <literal>\n</literal> to delimit your line endings in your script, but - expect your files to be readable with applications such as notepad. You - should use the <literal>'b'</literal> in all other cases. - </para> - <para> - If you do not specify the 'b' flag when working with binary files, you - may experience strange problems with your data, including broken image - files and strange problems with <literal>\r\n</literal> characters. - </para> - </note> - <note> - <para> - For portability, it is strongly recommended that you always - use the 'b' flag when opening files with <function>fopen</function>. - </para> - </note> - <note> - <para> - Again, for portability, it is also strongly recommended that - you re-write code that uses or relies upon the <literal>'t'</literal> - mode so that it uses the correct line endings and - <literal>'b'</literal> mode instead. - </para> - </note> - <para> - The optional third <parameter>use_include_path</parameter> parameter - can be set to '1' or &true; if you want to search for the file in - the <link linkend="ini.include-path">include_path</link>, too. + </informaltable> </para> - <simpara> - If the open fails, the function returns &false; and an error of - level <constant>E_WARNING</constant> is generated. You may use - <link linkend="language.operators.errorcontrol">@</link> to - suppress this warning. - </simpara> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>fopen</function> examples</title> @@ -233,42 +315,40 @@ </programlisting> </example> </para> - <simpara> - If you are experiencing problems with reading and writing to - files and you're using the server module version of PHP, remember - to make sure that the files and directories you're using are - accessible to the server process. - </simpara> - <para> - On the Windows platform, be careful to escape any backslashes - used in the path to the file, or use forward slashes. - <informalexample> - <programlisting role="php"> -<![CDATA[ -<?php -$handle = fopen("c:\\data\\info.txt", "r"); -?> -]]> - </programlisting> - </informalexample> - </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; &warn.ssl-non-standard; ¬e.sm.uidcheck.dir; - <simpara> - See also <xref linkend="wrappers"/>, - <function>fclose</function>, - <function>fgets</function>, - <function>fread</function>, - <function>fwrite</function>, - <function>fsockopen</function>, - <function>file</function>, - <function>file_exists</function>, - <function>is_readable</function>, - <function>stream_set_timeout</function>, - <function>popen</function>, and - <function>stream_context_create</function>. - </simpara> + <para> + If you are experiencing problems with reading and writing to files and + you're using the server module version of PHP, remember to make sure that + the files and directories you're using are accessible to the server + process. + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><xref linkend="wrappers"/></member> + <member><function>fclose</function></member> + <member><function>fgets</function></member> + <member><function>fread</function></member> + <member><function>fwrite</function></member> + <member><function>fsockopen</function></member> + <member><function>file</function></member> + <member><function>file_exists</function></member> + <member><function>is_readable</function></member> + <member><function>stream_set_timeout</function></member> + <member><function>popen</function></member> + <member><function>stream_context_create</function></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fputs.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filesystem/functions/fputs.xml diff -u phpdoc/en/reference/filesystem/functions/fputs.xml:1.6 phpdoc/en/reference/filesystem/functions/fputs.xml:1.7 --- phpdoc/en/reference/filesystem/functions/fputs.xml:1.6 Mon Apr 25 16:17:01 2005 +++ phpdoc/en/reference/filesystem/functions/fputs.xml Sat Jun 16 01:17:14 2007 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.fputs"> <refnamediv> <refname>fputs</refname> @@ -14,6 +13,7 @@ <function>fwrite</function>. </simpara> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/ftell.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/filesystem/functions/ftell.xml diff -u phpdoc/en/reference/filesystem/functions/ftell.xml:1.8 phpdoc/en/reference/filesystem/functions/ftell.xml:1.9 --- phpdoc/en/reference/filesystem/functions/ftell.xml:1.8 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/ftell.xml Sat Jun 16 01:17:14 2007 @@ -1,33 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.ftell"> <refnamediv> <refname>ftell</refname> <refpurpose>Tells file pointer read/write position</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>ftell</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> - Returns the position of the file pointer referenced by - <parameter>handle</parameter>; i.e., its offset into the - file stream. + Tells the file pointer read/write position. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - If an error occurs, returns &false;. + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <para> + The file pointer must be valid, and must point to a file successfully + opened by <function>fopen</function> or <function>popen</function>. + <function>ftell</function> gives undefined results for append-only streams + (opened with "a" flag). + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - The file pointer must be valid, and must point to a file - successfully opened by <function>fopen</function> or - <function>popen</function>. - <function>ftell</function> gives undefined results for append-only streams - (opened with "a" flag). + Returns the position of the file pointer referenced by + <parameter>handle</parameter>; i.e., its offset into the file stream. </para> <para> + If an error occurs, returns &false;. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> <example> <title><function>ftell</function> example</title> <programlisting role="php"> @@ -48,11 +70,20 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>fopen</function>, <function>popen</function>, - <function>fseek</function>, and <function>rewind</function>. + <simplelist> + <member><function>fopen</function></member> + <member><function>popen</function></member> + <member><function>fseek</function></member> + <member><function>rewind</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/glob.xml?r1=1.23&r2=1.24&diff_format=u Index: phpdoc/en/reference/filesystem/functions/glob.xml diff -u phpdoc/en/reference/filesystem/functions/glob.xml:1.23 phpdoc/en/reference/filesystem/functions/glob.xml:1.24 --- phpdoc/en/reference/filesystem/functions/glob.xml:1.23 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/glob.xml Sat Jun 16 01:17:14 2007 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.23 $ --> +<!-- $Revision: 1.24 $ --> <refentry id="function.glob"> <refnamediv> <refname>glob</refname> <refpurpose>Find pathnames matching a pattern</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>glob</methodname> <methodparam><type>string</type><parameter>pattern</parameter></methodparam> @@ -16,71 +17,118 @@ The <function>glob</function> function searches for all the pathnames matching <parameter>pattern</parameter> according to the rules used by the libc glob() function, which is similar to the rules used by common - shells. No tilde expansion or parameter substitution is done. + shells. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>pattern</parameter></term> + <listitem> + <para> + The pattern. No tilde expansion or parameter substitution is done. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>flags</parameter></term> + <listitem> + <para> + Valid flags: + <itemizedlist> + <listitem> + <simpara> + <constant>GLOB_MARK</constant> - Adds a slash to each item returned + </simpara> + </listitem> + <listitem> + <simpara> + <constant>GLOB_NOSORT</constant> - Return files as they appear in the + directory (no sorting) + </simpara> + </listitem> + <listitem> + <simpara> + <constant>GLOB_NOCHECK</constant> - Return the search pattern if no + files matching it were found + </simpara> + </listitem> + <listitem> + <simpara> + <constant>GLOB_NOESCAPE</constant> - Backslashes do not quote + metacharacters + </simpara> + </listitem> + <listitem> + <simpara> + <constant>GLOB_BRACE</constant> - Expands {a,b,c} to match 'a', 'b', + or 'c' + </simpara> + </listitem> + <listitem> + <simpara> + <constant>GLOB_ONLYDIR</constant> - Return only directory entries + which match the pattern + </simpara> + </listitem> + <listitem> + <simpara> + <constant>GLOB_ERR</constant> - Stop on read errors (like unreadable + directories), by default errors are ignored. + </simpara> + </listitem> + </itemizedlist> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> Returns an array containing the matched files/directories, an empty array if no file matched or &false; on error. </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; <para> - Valid flags: - <itemizedlist> - <listitem> - <simpara> - <constant>GLOB_MARK</constant> - Adds a slash to each item returned - </simpara> - </listitem> - <listitem> - <simpara> - <constant>GLOB_NOSORT</constant> - Return files as they appear in the - directory (no sorting) - </simpara> - </listitem> - <listitem> - <simpara> - <constant>GLOB_NOCHECK</constant> - Return the search pattern if no - files matching it were found - </simpara> - </listitem> - <listitem> - <simpara> - <constant>GLOB_NOESCAPE</constant> - Backslashes do not quote - metacharacters - </simpara> - </listitem> - <listitem> - <simpara> - <constant>GLOB_BRACE</constant> - Expands {a,b,c} to match 'a', 'b', - or 'c' - </simpara> - <note> - <simpara> - This flag is not available on some non GNU systems, like Solaris. - </simpara> - </note> - </listitem> - <listitem> - <simpara> - <constant>GLOB_ONLYDIR</constant> - Return only directory entries - which match the pattern - </simpara> - <note> - <simpara> - Before PHP 4.3.3 <constant>GLOB_ONLYDIR</constant> was - <emphasis role="strong">not</emphasis> - available on Windows and other systems not using the GNU - C library. - </simpara> - </note> - </listitem> - <listitem> - <simpara> - <constant>GLOB_ERR</constant> - Stop on read errors (like unreadable - directories), by default errors are ignored. Added in PHP 5.1.0. - </simpara> - </listitem> - </itemizedlist> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.1.0</entry> + <entry> + <constant>GLOB_ERR</constant> was added + </entry> + </row> + <row> + <entry>4.3.3</entry> + <entry> + <constant>GLOB_ONLYDIR</constant> bacame available on Windows and + other systems not using the GNU C library + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title> @@ -106,20 +154,36 @@ </screen> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; <note> <simpara> This function isn't available on some systems (e.g. old Sun OS). </simpara> </note> + <note> + <simpara> + The <constant>GLOB_BRACE</constant> flag is not available on some non GNU + systems, like Solaris. + </simpara> + </note> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>opendir</function>, - <function>readdir</function>, - <function>closedir</function>, and <function>fnmatch</function>. + <simplelist> + <member><function>opendir</function></member> + <member><function>readdir</function></member> + <member><function>closedir</function></member> + <member><function>fnmatch</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/is-dir.xml?r1=1.12&r2=1.13&diff_format=u Index: phpdoc/en/reference/filesystem/functions/is-dir.xml diff -u phpdoc/en/reference/filesystem/functions/is-dir.xml:1.12 phpdoc/en/reference/filesystem/functions/is-dir.xml:1.13 --- phpdoc/en/reference/filesystem/functions/is-dir.xml:1.12 Mon Feb 5 18:03:39 2007 +++ phpdoc/en/reference/filesystem/functions/is-dir.xml Sat Jun 16 01:17:14 2007 @@ -1,23 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.13 $ --> <refentry id="function.is-dir"> <refnamediv> <refname>is_dir</refname> <refpurpose>Tells whether the filename is a directory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>is_dir</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the filename exists and is a directory. If - <parameter>filename</parameter> is a relative filename, it will be - checked relative to the current working directory. + Tells whether the given filename is a directory. </para> - ¬e.clearstatcache; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. If <parameter>filename</parameter> is a relative + filename, it will be checked relative to the current working + directory. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the filename exists and is a directory, &false; + otherwise. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>is_dir</function> example</title> @@ -41,14 +68,27 @@ </screen> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; &tip.fopen-wrapper.stat; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>chdir</function>, <link linkend="class.dir">dir</link>, - <function>opendir</function>, <function>is_file</function> and - <function>is_link</function>. + <simplelist> + <member><function>chdir</function></member> + <member><link linkend="class.dir">dir</link></member> + <member><function>opendir</function></member> + <member><function>is_file</function></member> + <member><function>is_link</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/is-executable.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc/en/reference/filesystem/functions/is-executable.xml diff -u phpdoc/en/reference/filesystem/functions/is-executable.xml:1.13 phpdoc/en/reference/filesystem/functions/is-executable.xml:1.14 --- phpdoc/en/reference/filesystem/functions/is-executable.xml:1.13 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/is-executable.xml Sat Jun 16 01:17:14 2007 @@ -1,24 +1,73 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.14 $ --> <refentry id="function.is-executable"> <refnamediv> <refname>is_executable</refname> <refpurpose>Tells whether the filename is executable</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>is_executable</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the filename exists and is executable. + Tells whether the filename is executable. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the filename exists and is executable, or &false; on + error. + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; <para> - <function>is_executable</function> became available with - <productname>Windows</productname> in PHP version 5.0.0. + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + <function>is_executable</function> became available with + <productname>Windows</productname> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>is_executable</function> example</title> @@ -39,16 +88,24 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.clearstatcache; - &tip.fopen-wrapper.stat; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>is_file</function> and - <function>is_link</function>. + <simplelist> + <member><function>is_file</function></member> + <member><function>is_link</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/is-file.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/filesystem/functions/is-file.xml diff -u phpdoc/en/reference/filesystem/functions/is-file.xml:1.9 phpdoc/en/reference/filesystem/functions/is-file.xml:1.10 --- phpdoc/en/reference/filesystem/functions/is-file.xml:1.9 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/is-file.xml Sat Jun 16 01:17:14 2007 @@ -1,20 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.is-file"> <refnamediv> <refname>is_file</refname> <refpurpose>Tells whether the filename is a regular file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>is_file</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the filename exists and is a regular file. + Tells whether the given file is a regular file. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the filename exists and is a regular file, &false; + otherwise. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>is_file</function> example</title> @@ -35,16 +63,24 @@ </screen> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.clearstatcache; - &tip.fopen-wrapper.stat; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>is_dir</function> and - <function>is_link</function>. + <simplelist> + <member><function>is_dir</function></member> + <member><function>is_link</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/is-link.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filesystem/functions/is-link.xml diff -u phpdoc/en/reference/filesystem/functions/is-link.xml:1.7 phpdoc/en/reference/filesystem/functions/is-link.xml:1.8 --- phpdoc/en/reference/filesystem/functions/is-link.xml:1.7 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/is-link.xml Sat Jun 16 01:17:14 2007 @@ -1,30 +1,63 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.is-link"> <refnamediv> <refname>is_link</refname> <refpurpose>Tells whether the filename is a symbolic link</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>is_link</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the filename exists and is a symbolic link. + Tells whether the given file is a symbolic link. </para> + </refsect1> - ¬e.clearstatcache; + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the filename exists and is a symbolic link, &false; + otherwise. + </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; &tip.fopen-wrapper.stat; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>is_dir</function>, - <function>is_file</function>, and <function>readlink</function>. + <simplelist> + <member><function>is_dir</function></member> + <member><function>is_file</function></member> + <member><function>readlink</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/is-readable.xml?r1=1.12&r2=1.13&diff_format=u Index: phpdoc/en/reference/filesystem/functions/is-readable.xml diff -u phpdoc/en/reference/filesystem/functions/is-readable.xml:1.12 phpdoc/en/reference/filesystem/functions/is-readable.xml:1.13 --- phpdoc/en/reference/filesystem/functions/is-readable.xml:1.12 Fri Jun 15 19:45:56 2007 +++ phpdoc/en/reference/filesystem/functions/is-readable.xml Sat Jun 16 01:17:14 2007 @@ -1,26 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.13 $ --> <refentry id="function.is-readable"> <refnamediv> <refname>is_readable</refname> <refpurpose>Tells whether the filename is readable</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>is_readable</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the file or directory specified by - <parameter>filename</parameter> exists and is readable. + Tells whether the filename is readable. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - Keep in mind that PHP may be accessing the file as the user - id that the web server runs as (often 'nobody'). Safe mode - limitations are not taken into account. + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the file or directory specified by + <parameter>filename</parameter> exists and is readable, &false; otherwise. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>is_readable</function> example</title> @@ -38,23 +60,35 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + <para> + Keep in mind that PHP may be accessing the file as the user + id that the web server runs as (often 'nobody'). Safe mode + limitations are not taken into account. + </para> ¬e.clearstatcache; - &tip.fopen-wrapper.stat; - <note> <para> The check is done using the real UID/GID instead of the effective one. </para> </note> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>is_writable</function>, - <function>file_exists</function>, and - <function>fgets</function>. + <simplelist> + <member><function>is_writable</function></member> + <member><function>file_exists</function></member> + <member><function>fgets</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/is-writeable.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/filesystem/functions/is-writeable.xml diff -u phpdoc/en/reference/filesystem/functions/is-writeable.xml:1.4 phpdoc/en/reference/filesystem/functions/is-writeable.xml:1.5 --- phpdoc/en/reference/filesystem/functions/is-writeable.xml:1.4 Mon Apr 25 16:17:01 2005 +++ phpdoc/en/reference/filesystem/functions/is-writeable.xml Sat Jun 16 01:17:14 2007 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.55 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.is-writeable"> <refnamediv> <refname>is_writeable</refname> @@ -14,6 +13,7 @@ <function>is_writable</function>. </simpara> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/lchgrp.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/reference/filesystem/functions/lchgrp.xml diff -u phpdoc/en/reference/filesystem/functions/lchgrp.xml:1.2 phpdoc/en/reference/filesystem/functions/lchgrp.xml:1.3 --- phpdoc/en/reference/filesystem/functions/lchgrp.xml:1.2 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/lchgrp.xml Sat Jun 16 01:17:14 2007 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.lchgrp"> <refnamediv> <refname>lchgrp</refname> <refpurpose>Changes group ownership of symlink</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>lchgrp</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -14,22 +15,64 @@ </methodsynopsis> <para> Attempts to change the group of the symlink <parameter>filename</parameter> - to <parameter>group</parameter> (specified by name or number). Only the - superuser may change the group of a symlink arbitrarily; other users may - change the group of a symlink to any group of which that user is a member. + to <parameter>group</parameter>. </para> <para> + Only the superuser may change the group of a symlink arbitrarily; other + users may change the group of a symlink to any group of which that user is + a member. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the symlink. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>group</parameter></term> + <listitem> + <para> + The group specified by name or number. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> &return.success; </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; ¬e.sm.uidcheck; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>chgrp</function>, - <function>lchown</function> - <function>chown</function>&listendand; - <function>chmod</function>. + <simplelist> + <member><function>chgrp</function></member> + <member><function>lchown</function></member> + <member><function>chown</function></member> + <member><function>chmod</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/lchown.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/reference/filesystem/functions/lchown.xml diff -u phpdoc/en/reference/filesystem/functions/lchown.xml:1.2 phpdoc/en/reference/filesystem/functions/lchown.xml:1.3 --- phpdoc/en/reference/filesystem/functions/lchown.xml:1.2 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/lchown.xml Sat Jun 16 01:17:14 2007 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.lchown"> <refnamediv> <refname>lchown</refname> <refpurpose>Changes user ownership of symlink</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>lchown</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -14,21 +15,62 @@ </methodsynopsis> <para> Attempts to change the owner of the symlink <parameter>filename</parameter> - to user <parameter>user</parameter> (specified by name or number). Only - the superuser may change the owner of a symlink. + to user <parameter>user</parameter>. </para> <para> + Only the superuser may change the owner of a symlink. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>user</parameter></term> + <listitem> + <para> + User name or number. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> &return.success; </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; ¬e.sm.uidcheck; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>chown</function>, - <function>lchgrp</function>, - <function>chgrp</function>&listendand; - <function>chmod</function>. + <simplelist> + <member><function>chgrp</function></member> + <member><function>lchgrp</function></member> + <member><function>chgrp</function></member> + <member><function>chmod</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/link.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/filesystem/functions/link.xml diff -u phpdoc/en/reference/filesystem/functions/link.xml:1.8 phpdoc/en/reference/filesystem/functions/link.xml:1.9 --- phpdoc/en/reference/filesystem/functions/link.xml:1.8 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/link.xml Sat Jun 16 01:17:14 2007 @@ -1,31 +1,71 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.link"> <refnamediv> <refname>link</refname> <refpurpose>Create a hard link</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>link</methodname> <methodparam><type>string</type><parameter>target</parameter></methodparam> <methodparam><type>string</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> - <function>link</function> creates a hard link. &return.success; + <function>link</function> creates a hard link. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>target</parameter></term> + <listitem> + <para> + Target of the link. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>link</parameter></term> + <listitem> + <para> + The link name. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-remote; ¬e.no-windows; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also the <function>symlink</function> to create soft links, - and <function>readlink</function> along with - <function>linkinfo</function>. + <simplelist> + <member><function>symlink</function></member> + <member><function>readlink</function></member> + <member><function>linkinfo</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/linkinfo.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/filesystem/functions/linkinfo.xml diff -u phpdoc/en/reference/filesystem/functions/linkinfo.xml:1.8 phpdoc/en/reference/filesystem/functions/linkinfo.xml:1.9 --- phpdoc/en/reference/filesystem/functions/linkinfo.xml:1.8 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/linkinfo.xml Sat Jun 16 01:17:14 2007 @@ -1,27 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.linkinfo"> <refnamediv> <refname>linkinfo</refname> <refpurpose>Gets information about a link</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>linkinfo</methodname> <methodparam><type>string</type><parameter>path</parameter></methodparam> </methodsynopsis> <para> - <function>linkinfo</function> returns the <literal>st_dev</literal> - field of the Unix C stat structure returned by the <literal>lstat</literal> - system call. This function is used to verify if a link (pointed to by - <parameter>path</parameter>) really exists (using the same method - as the S_ISLNK macro defined in <filename>stat.h</filename>). - Returns 0 or &false; in - case of error. + Gets information about a link. </para> <para> + This function is used to verify if a link (pointed to by + <parameter>path</parameter>) really exists (using the same method as the + S_ISLNK macro defined in <filename>stat.h</filename>). + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>path</parameter></term> + <listitem> + <para> + Path to the link. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + <function>linkinfo</function> returns the <literal>st_dev</literal> field + of the Unix C stat structure returned by the <literal>lstat</literal> + system call. Returns 0 or &false; in case of error. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> <example> <title><function>linkinfo</function> example</title> <programlisting role="php"> @@ -35,12 +63,24 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-windows; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>symlink</function>, <function>link</function>, - and <function>readlink</function>. + <simplelist> + <member><function>symlink</function></member> + <member><function>link</function></member> + <member><function>readlink</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/lstat.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filesystem/functions/lstat.xml diff -u phpdoc/en/reference/filesystem/functions/lstat.xml:1.7 phpdoc/en/reference/filesystem/functions/lstat.xml:1.8 --- phpdoc/en/reference/filesystem/functions/lstat.xml:1.7 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/lstat.xml Sat Jun 16 01:17:14 2007 @@ -1,38 +1,66 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.lstat"> <refnamediv> <refname>lstat</refname> <refpurpose>Gives information about a file or symbolic link</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>lstat</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> Gathers the statistics of the file or symbolic link named by - <parameter>filename</parameter>. This function is identical to the - <function>stat</function> function except that if the - <parameter>filename</parameter> parameter is a symbolic link, the - status of the symbolic link is returned, not the status of the - file pointed to by the symbolic link. + <parameter>filename</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to a file or a symbolic link. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> See the manual page for <function>stat</function> for information on the structure of the array that <function>lstat</function> returns. + This function is identical to the <function>stat</function> function + except that if the <parameter>filename</parameter> parameter is a symbolic + link, the status of the symbolic link is returned, not the status of the + file pointed to by the symbolic link. </para> + </refsect1> + <refsect1 role="notes"> + &reftitle.notes; ¬e.clearstatcache; - &tip.fopen-wrapper.stat; + </refsect1> - <simpara> - See also <function>stat</function>. - </simpara> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>stat</function></member> + </simplelist> + </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/mkdir.xml?r1=1.18&r2=1.19&diff_format=u Index: phpdoc/en/reference/filesystem/functions/mkdir.xml diff -u phpdoc/en/reference/filesystem/functions/mkdir.xml:1.18 phpdoc/en/reference/filesystem/functions/mkdir.xml:1.19 --- phpdoc/en/reference/filesystem/functions/mkdir.xml:1.18 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/mkdir.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.18 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.39 --> +<!-- $Revision: 1.19 $ --> <refentry id="function.mkdir"> <refnamediv> <refname>mkdir</refname> <refpurpose>Makes directory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>mkdir</methodname> <methodparam><type>string</type><parameter>pathname</parameter></methodparam> @@ -18,25 +18,109 @@ <para> Attempts to create the directory specified by pathname. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>pathname</parameter></term> + <listitem> + <para> + The directory path. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>mode</parameter></term> + <listitem> + <para> + The mode is 0777 by default, which means the widest possible + access. For more information on modes, read the details + on the <function>chmod</function> page. + </para> + <note> + <para> + <parameter>mode</parameter> is ignored on Windows. + </para> + </note> + <para> + Note that you probably want to specify the mode as an octal number, + which means it should have a leading zero. The mode is also modified + by the current umask, which you can change using + <function>umask</function>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>recursive</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>context</parameter></term> + <listitem> + ¬e.context-support; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + The <parameter>recursive</parameter> parameter was added + </entry> + </row> + <row> + <entry>5.0.0</entry> + <entry> + As of PHP 5.0.0 <function>mkdir</function> can also be used with + <emphasis>some</emphasis> URL wrappers. Refer to <xref + linkend="wrappers"/> for a listing of which wrappers support + <function>mkdir</function> + </entry> + </row> + <row> + <entry>4.2.0</entry> + <entry> + The <parameter>mode</parameter> parameter became optional. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> - Note that you probably want to specify the mode as an - octal number, which means it should have a leading zero. - The mode is also modified by the current umask, which you - can change using <function>umask</function>. - </para> - <para> - <note> - <para> - Mode is ignored on Windows, and became optional in PHP 4.2.0. - </para> - </note> - </para> - <para> - The mode is 0777 by default, which means the widest possible - access. For more information on modes, read the details - on the <function>chmod</function> page. <example> - <title><function>mkdir</function> example</title> + <title><function>mkdir</function> example</title> <programlisting role="php"> <![CDATA[ <?php @@ -46,27 +130,22 @@ </programlisting> </example> </para> - <para> - &return.success; - </para> - <note> - <simpara> - As of PHP 5.0.0 <function>mkdir</function> can also be - used with <emphasis>some</emphasis> URL wrappers. Refer to <xref linkend="wrappers"/> - for a listing of which wrappers support <function>mkdir</function>. - </simpara> - </note> - ¬e.context-support; - <note> - <simpara> - The <parameter>recursive</parameter> parameter was added as of PHP 5.0.0. - </simpara> - </note> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.sm.uidcheck.dir; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>rmdir</function>. + <simplelist> + <member><function>rmdir</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/pclose.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/filesystem/functions/pclose.xml diff -u phpdoc/en/reference/filesystem/functions/pclose.xml:1.5 phpdoc/en/reference/filesystem/functions/pclose.xml:1.6 --- phpdoc/en/reference/filesystem/functions/pclose.xml:1.5 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/pclose.xml Sat Jun 16 01:17:14 2007 @@ -1,33 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.pclose"> <refnamediv> <refname>pclose</refname> <refpurpose>Closes process file pointer</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>pclose</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> - Closes a file pointer to a pipe opened by - <function>popen</function>. + Closes a file pointer to a pipe opened by <function>popen</function>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - The file pointer must be valid, and must have been returned by a - successful call to <function>popen</function>. + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <para> + The file pointer must be valid, and must have been returned by a + successful call to <function>popen</function>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - Returns the termination status of the process that was - run. + Returns the termination status of the process that was run. </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>popen</function>. + <simplelist> + <member><function>popen</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/readlink.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/filesystem/functions/readlink.xml diff -u phpdoc/en/reference/filesystem/functions/readlink.xml:1.8 phpdoc/en/reference/filesystem/functions/readlink.xml:1.9 --- phpdoc/en/reference/filesystem/functions/readlink.xml:1.8 Fri Jun 15 19:45:56 2007 +++ phpdoc/en/reference/filesystem/functions/readlink.xml Sat Jun 16 01:17:14 2007 @@ -1,22 +1,47 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.readlink"> <refnamediv> <refname>readlink</refname> <refpurpose>Returns the target of a symbolic link</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>readlink</methodname> <methodparam><type>string</type><parameter>path</parameter></methodparam> </methodsynopsis> <para> - <function>readlink</function> does the same as the readlink C - function and returns the contents of the symbolic link path or &false; - in case of error. + <function>readlink</function> does the same as the readlink C function. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>path</parameter></term> + <listitem> + <para> + The symbolic link path. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the contents of the symbolic link path or &false; on error. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>readlink</function> example</title> @@ -32,13 +57,24 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-windows; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>is_link</function>, - <function>symlink</function>, and - <function>linkinfo</function>. + <simplelist> + <member><function>is_link</function></member> + <member><function>symlink</function></member> + <member><function>linkinfo</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/rename.xml?r1=1.12&r2=1.13&diff_format=u Index: phpdoc/en/reference/filesystem/functions/rename.xml diff -u phpdoc/en/reference/filesystem/functions/rename.xml:1.12 phpdoc/en/reference/filesystem/functions/rename.xml:1.13 --- phpdoc/en/reference/filesystem/functions/rename.xml:1.12 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/rename.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.13 $ --> <refentry id="function.rename"> <refnamediv> <refname>rename</refname> <refpurpose>Renames a file or directory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>rename</methodname> <methodparam><type>string</type><parameter>oldname</parameter></methodparam> @@ -18,9 +18,87 @@ Attempts to rename <parameter>oldname</parameter> to <parameter>newname</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>oldname</parameter></term> + <listitem> + <para> + </para> + <note> + <para> + The old name. The wrapper used in <parameter>oldname</parameter> + <emphasis>must</emphasis> match the wrapper used in + <parameter>newname</parameter>. + </para> + </note> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>newname</parameter></term> + <listitem> + <para> + The new name. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>context</parameter></term> + <listitem> + ¬e.context-support; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + <function>rename</function> can now also be used with + <emphasis>some</emphasis> URL wrappers. Refer to <xref + linkend="wrappers"/> for a listing of which wrappers + support <function>rename</function>. + </entry> + </row> + <row> + <entry>4.3.3</entry> + <entry> + <function>rename</function> is now able to rename files across + partitions on *nix based systems. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Example with <function>rename</function></title> @@ -33,32 +111,19 @@ </programlisting> </example> </para> - <note> - <para> - Prior to PHP 4.3.3, <function>rename</function> could not rename files - across partitions on *nix based systems. - </para> - </note> - <note> - <simpara> - As of PHP 5.0.0 <function>rename</function> can also be - used with <emphasis>some</emphasis> URL wrappers. Refer to <xref linkend="wrappers"/> - for a listing of which wrappers support <function>rename</function>. - </simpara> - </note> - <note> - <simpara> - The wrapper used in <parameter>oldname</parameter> <emphasis>MUST</emphasis> - match the wrapper used in <parameter>newname</parameter>. - </simpara> - </note> - ¬e.context-support; - <para> - See also <function>copy</function>, - <function>unlink</function>, and - <function>move_uploaded_file</function>. + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>copy</function></member> + <member><function>unlink</function></member> + <member><function>move_uploaded_file</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/rewind.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/filesystem/functions/rewind.xml diff -u phpdoc/en/reference/filesystem/functions/rewind.xml:1.9 phpdoc/en/reference/filesystem/functions/rewind.xml:1.10 --- phpdoc/en/reference/filesystem/functions/rewind.xml:1.9 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/rewind.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.rewind"> <refnamediv> <refname>rewind</refname> <refpurpose>Rewind the position of a file pointer</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>rewind</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> @@ -16,24 +16,49 @@ Sets the file position indicator for <parameter>handle</parameter> to the beginning of the file stream. </para> - <para> - &return.success; - </para> - <para> - The file pointer must be valid, and must point to a file - successfully opened by <function>fopen</function>. - </para> <note> <para> - If you have opened the file in append ("a" or "a+") mode, any data you write - to the file will always be appended, regardless of the file position. + If you have opened the file in append ("a" or "a+") mode, any data you + write to the file will always be appended, regardless of the file + position. </para> </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - See also <function>fseek</function> and - <function>ftell</function>. + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <para> + The file pointer must be valid, and must point to a file + successfully opened by <function>fopen</function>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>fseek</function></member> + <member><function>ftell</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/rmdir.xml?r1=1.10&r2=1.11&diff_format=u Index: phpdoc/en/reference/filesystem/functions/rmdir.xml diff -u phpdoc/en/reference/filesystem/functions/rmdir.xml:1.10 phpdoc/en/reference/filesystem/functions/rmdir.xml:1.11 --- phpdoc/en/reference/filesystem/functions/rmdir.xml:1.10 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/rmdir.xml Sat Jun 16 01:17:14 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.11 $ --> <refentry id="function.rmdir"> <refnamediv> <refname>rmdir</refname> <refpurpose>Removes directory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>rmdir</methodname> <methodparam><type>string</type><parameter>dirname</parameter></methodparam> @@ -16,21 +16,80 @@ <para> Attempts to remove the directory named by <parameter>dirname</parameter>. The directory must be empty, and the relevant permissions must permit this. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>dirname</parameter></term> + <listitem> + <para> + Path to the directory. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>context</parameter></term> + <listitem> + ¬e.context-support; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> &return.success; </para> - <note> - <simpara> - As of PHP 5.0.0 <function>rmdir</function> can also be - used with <emphasis>some</emphasis> URL wrappers. Refer to <xref linkend="wrappers"/> - for a listing of which wrappers support <function>rmdir</function>. - </simpara> - </note> - ¬e.context-support; + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + As of PHP 5.0.0 <function>rmdir</function> can also be used with + <emphasis>some</emphasis> URL wrappers. Refer to <xref + linkend="wrappers"/> for a listing of which wrappers support + <function>rmdir</function>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.sm.uidcheck.dir; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>mkdir</function> and <function>unlink</function>. + <simplelist> + <member><function>mkdir</function></member> + <member><function>unlink</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/set-file-buffer.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filesystem/functions/set-file-buffer.xml diff -u phpdoc/en/reference/filesystem/functions/set-file-buffer.xml:1.6 phpdoc/en/reference/filesystem/functions/set-file-buffer.xml:1.7 --- phpdoc/en/reference/filesystem/functions/set-file-buffer.xml:1.6 Mon Apr 25 16:17:01 2005 +++ phpdoc/en/reference/filesystem/functions/set-file-buffer.xml Sat Jun 16 01:17:14 2007 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.set-file-buffer"> <refnamediv> <refname>set_file_buffer</refname> @@ -14,6 +13,7 @@ <function>stream_set_write_buffer</function>. </simpara> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/stat.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/reference/filesystem/functions/stat.xml diff -u phpdoc/en/reference/filesystem/functions/stat.xml:1.14 phpdoc/en/reference/filesystem/functions/stat.xml:1.15 --- phpdoc/en/reference/filesystem/functions/stat.xml:1.14 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/stat.xml Sat Jun 16 01:17:14 2007 @@ -1,37 +1,47 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.15 $ --> <refentry id="function.stat"> <refnamediv> <refname>stat</refname> <refpurpose>Gives information about a file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>stat</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> Gathers the statistics of the file named by - <parameter>filename</parameter>. If <parameter>filename</parameter> - is a symbolic link, statistics are from the file itself, not the - symlink. <function>lstat</function> is identical to <function> - stat</function> except it would instead be based off the symlinks - status. - </para> - <para> - In case of error, <function>stat</function> returns &false;. It also - will throw a warning. - </para> - <para> - Returns an array with the statistics of the file with the - following elements. This array is zero-based. In addition to - returning these attributes in a numeric array, they can be accessed - with associative indices, as noted next to each parameter; this is - available since PHP 4.0.6: + <parameter>filename</parameter>. If <parameter>filename</parameter> is a + symbolic link, statistics are from the file itself, not the symlink. </para> <para> + <function>lstat</function> is identical to <function>stat</function> + except it would instead be based off the symlinks status. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> <table> <title><function>stat</function> and <function>fstat</function> result format</title> @@ -109,26 +119,68 @@ <entry>blocks</entry> <entry>number of blocks allocated</entry> </row> - </tbody> </tgroup> </table> - * Only valid on systems supporting the st_blksize type - other systems (e.g. Windows) return -1. </para> + <para> + In case of error, <function>stat</function> returns &false;. + </para> + </refsect1> - ¬e.clearstatcache; + <refsect1 role="errors"> + &reftitle.errors; + <para> + Upon failure, an <constant>E_WARNING</constant> is emitted. + </para> + </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.0.6</entry> + <entry> + In addition to returning these attributes in a numeric array, they + can be accessed with associative indices, as noted next to each + parameter + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + ¬e.clearstatcache; &tip.fopen-wrapper.stat; + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>lstat</function>, - <function>fstat</function>, - <function>filemtime</function>, and - <function>filegroup</function>. + <simplelist> + <member><function>lstat</function></member> + <member><function>fstat</function></member> + <member><function>filemtime</function></member> + <member><function>filegroup</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/symlink.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filesystem/functions/symlink.xml diff -u phpdoc/en/reference/filesystem/functions/symlink.xml:1.7 phpdoc/en/reference/filesystem/functions/symlink.xml:1.8 --- phpdoc/en/reference/filesystem/functions/symlink.xml:1.7 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/symlink.xml Sat Jun 16 01:17:14 2007 @@ -1,33 +1,72 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.symlink"> <refnamediv> <refname>symlink</refname> <refpurpose>Creates a symbolic link</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>symlink</methodname> <methodparam><type>string</type><parameter>target</parameter></methodparam> <methodparam><type>string</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> - <function>symlink</function> creates a symbolic link - to the existing <parameter>target</parameter> with - the specified name <parameter>link</parameter>. + <function>symlink</function> creates a symbolic link to the existing + <parameter>target</parameter> with the specified name + <parameter>link</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>target</parameter></term> + <listitem> + <para> + Target of the link. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>link</parameter></term> + <listitem> + <para> + The link name. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; ¬e.no-windows; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>link</function> to create hard links, - and <function>readlink</function> along with - <function>linkinfo</function>. + <simplelist> + <member><function>link</function> to create hard links</member> + <member><function>readlink</function> along with + <function>linkinfo</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/tmpfile.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/filesystem/functions/tmpfile.xml diff -u phpdoc/en/reference/filesystem/functions/tmpfile.xml:1.9 phpdoc/en/reference/filesystem/functions/tmpfile.xml:1.10 --- phpdoc/en/reference/filesystem/functions/tmpfile.xml:1.9 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/tmpfile.xml Sat Jun 16 01:17:14 2007 @@ -1,21 +1,22 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.32 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.tmpfile"> <refnamediv> <refname>tmpfile</refname> <refpurpose>Creates a temporary file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>tmpfile</methodname> <void/> </methodsynopsis> <para> - Creates a temporary file with a unique name in read-write (w+) mode, - returning a file handle similar to the one returned by - <function>fopen</function>. + Creates a temporary file with a unique name in read-write (w+) mode and + returns a file handle . + </para> + <para> The file is automatically removed when closed (using <function>fclose</function>), or when the script ends. </para> @@ -24,6 +25,18 @@ <literal>tmpfile(3)</literal> function, as well as the <filename>stdio.h</filename> header file. </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a file handle, similar to the one returned by + <function>fopen</function>, for the new file, or &false; on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>tmpfile</function> example</title> @@ -46,10 +59,18 @@ </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>tempnam</function>, <function>sys_get_temp_dir</function>. + <simplelist> + <member><function>tempnam</function></member> + <member><function>sys_get_temp_dir</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/unlink.xml?r1=1.10&r2=1.11&diff_format=u Index: phpdoc/en/reference/filesystem/functions/unlink.xml diff -u phpdoc/en/reference/filesystem/functions/unlink.xml:1.10 phpdoc/en/reference/filesystem/functions/unlink.xml:1.11 --- phpdoc/en/reference/filesystem/functions/unlink.xml:1.10 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/unlink.xml Sat Jun 16 01:17:14 2007 @@ -1,34 +1,89 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.11 $ --> <refentry id="function.unlink"> <refnamediv> <refname>unlink</refname> <refpurpose>Deletes a file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>unlink</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam> </methodsynopsis> <para> - Deletes <parameter>filename</parameter>. Similar to the Unix C - unlink() function. &return.success; + Deletes <parameter>filename</parameter>. Similar to the Unix C unlink() + function. </para> - <note> - <simpara> - As of PHP 5.0.0 <function>unlink</function> can also be - used with <emphasis>some</emphasis> URL wrappers. Refer to <xref linkend="wrappers"/> - for a listing of which wrappers support <function>unlink</function>. - </simpara> - </note> - ¬e.context-support; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>context</parameter></term> + <listitem> + ¬e.context-support; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - See also <function>rmdir</function> for removing directories. + &return.success; </para> </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + As of PHP 5.0.0 <function>unlink</function> can also be used with + <emphasis>some</emphasis> URL wrappers. Refer to <xref + linkend="wrappers"/> for a listing of which wrappers support + <function>unlink</function>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>rmdir</function> for removing directories</member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file