cvs: phpdoc-fr /reference/filesystem/functions chgrp.xml chmod.xml chown.xml clearstatcache.xml fflush.xml fgetss.xml file-get-contents.xml
fileatime.xml filectime.xml filegroup.xml fileinode.xml filemtime.xml fileowner.xml fileperms.xml fnmatch.xml fread.xml fscanf.xml ftell.xml
| From: | Yannick Torres | Date: | Sun, 07 Dec 2008 21:39:20 +0000 |
| Subject: | cvs: phpdoc-fr /reference/filesystem/functions chgrp.xml chmod.xml chown.xml clearstatcache.xml fflush.xml fgetss.xml file-get-contents.xml fileatime.xml filectime.xml filegroup.xml fileinode.xml filemtime.xml fileowner.xml fileperms.xml fnmatch.xml fread.xml fscanf.xml ftell.xml |
||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-6146@lists.php.net to get a copy of this message | ||
yannick Sun Dec 7 21:39:20 2008 UTC
Modified files:
/phpdoc-fr/reference/filesystem/functions chgrp.xml chmod.xml
chown.xml
clearstatcache.xml
fflush.xml fgetss.xml
fileatime.xml
filectime.xml
file-get-contents.xml
filegroup.xml
fileinode.xml
filemtime.xml
fileowner.xml
fileperms.xml fnmatch.xml
fread.xml fscanf.xml
ftell.xml
Log:
sync with EN
http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/chgrp.xml?r1=1.15&r2=1.16&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/chgrp.xml diff -u phpdoc-fr/reference/filesystem/functions/chgrp.xml:1.15 phpdoc-fr/reference/filesystem/functions/chgrp.xml:1.16 --- phpdoc-fr/reference/filesystem/functions/chgrp.xml:1.15 Sat Apr 5 14:07:45 2008 +++ phpdoc-fr/reference/filesystem/functions/chgrp.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.16 $ --> +<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.chgrp"> @@ -60,6 +60,26 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Modification de groupe d'un fichier</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'shared_file.txt'; +$format = "%s's Group ID @ %s: %d\n"; +printf($format, $filename, date('r'), filegroup($filename)); +chgrp($filename, 8); +printf($format, $filename, date('r'), filegroup($filename)); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.no-remote; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/chmod.xml?r1=1.21&r2=1.22&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/chmod.xml diff -u phpdoc-fr/reference/filesystem/functions/chmod.xml:1.21 phpdoc-fr/reference/filesystem/functions/chmod.xml:1.22 --- phpdoc-fr/reference/filesystem/functions/chmod.xml:1.21 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/chmod.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21 $ --> -<!-- EN-Revision: 1.16 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.22 $ --> +<!-- EN-Revision: 1.17 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.chmod"> @@ -128,6 +128,8 @@ <simplelist> <member><function>chown</function></member> <member><function>chgrp</function></member> + <member><function>fileperms</function></member> + <member><function>stat</function></member> </simplelist> </para> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/chown.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/chown.xml diff -u phpdoc-fr/reference/filesystem/functions/chown.xml:1.16 phpdoc-fr/reference/filesystem/functions/chown.xml:1.17 --- phpdoc-fr/reference/filesystem/functions/chown.xml:1.16 Sun Apr 6 16:55:35 2008 +++ phpdoc-fr/reference/filesystem/functions/chown.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.17 $ --> +<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.chown"> @@ -55,6 +55,55 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>chown</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +// Nom du fichier et nom d'utilisateur à utiliser +$file_name= "foo.php"; +$path = "/home/sites/php.net/public_html/sandbox" . $file_name ; +$user_name = "root"; + +// Définit l'utilisateur +chown($path, $user_name); + +// Vérification du résultat +$stat = stat($path); +print_r(posix_getpwuid($stat['uid'])); + +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +array(7) { + ["name"]=> + string(13) "php.net" + ["passwd"]=> + string(1) "x" + ["uid"]=> + int(148864) + ["gid"]=> + int(148910) + ["gecos"]=> + string(13) "php.net" + ["dir"]=> + string(25) "/home/sites/php.net" + ["shell"]=> + string(13) "/sbin/nologin" +} +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.no-remote; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/clearstatcache.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/clearstatcache.xml diff -u phpdoc-fr/reference/filesystem/functions/clearstatcache.xml:1.16 phpdoc-fr/reference/filesystem/functions/clearstatcache.xml:1.17 --- phpdoc-fr/reference/filesystem/functions/clearstatcache.xml:1.16 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/clearstatcache.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.17 $ --> +<!-- EN-Revision: 1.17 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.clearstatcache"> @@ -13,7 +13,8 @@ &reftitle.description; <methodsynopsis> <type>void</type><methodname>clearstatcache</methodname> - <void/> + <methodparam choice="opt"><type>bool</type><parameter>clear_realpath_cache</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> L'appel à la fonction <function>stat</function> ou @@ -65,6 +66,31 @@ </para> </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>clear_realpath_cache</parameter></term> + <listitem> + <para> + Si l'on doit ou non vider le cache réel (par défaut, vaut &false;). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Nettoye le cache réel d'un fichier spécifique. Ne peut être utilisé + que si le paramètre <parameter>clear_realpath_cache</parameter> vaut &true;. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> @@ -72,6 +98,72 @@ </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.3.0</entry> + <entry> + Ajout des paramètres optionnels <parameter>clear_realpath_cache</parameter> + et <parameter>filename</parameter>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>clearstatcache</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$file = 'output_log.txt'; + +function get_owner($file) +{ + $stat = stat($file); + $user = posix_getpwuid($s['uid']); + return $user['name']; +} + +$format = "UID @ %s: %s\n"; + +printf($format, date('r'), get_owner($file)); + +chown($path, 'ross'); +printf($format, date('r'), get_owner($file)); + +clearstatcache(); +printf($format, date('r'), get_owner($file)); +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +UID @ Sun, 12 Oct 2008 20:48:28 +0100: root +UID @ Sun, 12 Oct 2008 20:48:28 +0100: root +UID @ Sun, 12 Oct 2008 20:48:28 +0100: ross +]]> + </screen> + </example> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fflush.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fflush.xml diff -u phpdoc-fr/reference/filesystem/functions/fflush.xml:1.13 phpdoc-fr/reference/filesystem/functions/fflush.xml:1.14 --- phpdoc-fr/reference/filesystem/functions/fflush.xml:1.13 Sat Apr 5 14:07:45 2008 +++ phpdoc-fr/reference/filesystem/functions/fflush.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.14 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fflush"> @@ -42,6 +42,39 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Écriture d'un fichier en utilisant <function>fflush</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'bar.txt'; + +$file = fopen($filename, 'r+'); +rewind($file); +fwrite($file, 'Foo'); +fflush($file); +ftruncate($file, ftell($file)); +fclose($file); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>clearstatcache</function></member> + <member><function>fwrite</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fgetss.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fgetss.xml diff -u phpdoc-fr/reference/filesystem/functions/fgetss.xml:1.16 phpdoc-fr/reference/filesystem/functions/fgetss.xml:1.17 --- phpdoc-fr/reference/filesystem/functions/fgetss.xml:1.16 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/fgetss.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.17 $ --> +<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fgetss"> @@ -96,6 +96,44 @@ </para> </refsect1> + <refsect1 role="examples"> + <para> + <example> + <title>Lecture d'un fichier PHP ligne par ligne</title> + <programlisting role="php"> +<![CDATA[ +<?php +$str = <<<EOD +<html><body> + <p>Welcome! Today is the <?php echo(date('jS')); ?> of <?= date('F'); ?>.</p> +</body></html> +Text outside of the HTML block. +EOD; +file_put_contents('sample.php', $str); + +$handle = @fopen("sample.php", "r"); +if ($handle) { + while (!feof($handle)) { + $buffer = fgetss($handle, 4096); + echo $buffer; + } + fclose($handle); +} +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ + Welcome! Today is the of . + +Text outside of the HTML block. +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.line-endings; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fileatime.xml?r1=1.21&r2=1.22&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fileatime.xml diff -u phpdoc-fr/reference/filesystem/functions/fileatime.xml:1.21 phpdoc-fr/reference/filesystem/functions/fileatime.xml:1.22 --- phpdoc-fr/reference/filesystem/functions/fileatime.xml:1.21 Sun Apr 13 15:39:03 2008 +++ phpdoc-fr/reference/filesystem/functions/fileatime.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21 $ --> -<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.22 $ --> +<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fileatime"> @@ -84,6 +84,7 @@ Sur de telles systèmes de fichiers, cette fonction devient totalement inutile. </para> </note> + ¬e.filesystem-time-res; ¬e.clearstatcache; &tip.fopen-wrapper.stat; </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/filectime.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/filectime.xml diff -u phpdoc-fr/reference/filesystem/functions/filectime.xml:1.17 phpdoc-fr/reference/filesystem/functions/filectime.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/filectime.xml:1.17 Sun Apr 6 09:38:39 2008 +++ phpdoc-fr/reference/filesystem/functions/filectime.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.14 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filectime"> @@ -89,6 +89,7 @@ des systèmes UNIX. </para> </note> + ¬e.filesystem-time-res; ¬e.clearstatcache; &tip.fopen-wrapper.stat; </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/file-get-contents.xml?r1=1.26&r2=1.27&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/file-get-contents.xml diff -u phpdoc-fr/reference/filesystem/functions/file-get-contents.xml:1.26 phpdoc-fr/reference/filesystem/functions/file-get-contents.xml:1.27 --- phpdoc-fr/reference/filesystem/functions/file-get-contents.xml:1.26 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/file-get-contents.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.26 $ --> -<!-- EN-Revision: 1.31 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.27 $ --> +<!-- EN-Revision: 1.32 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.file-get-contents"> @@ -72,7 +72,7 @@ <para> La valeur de <parameter>flags</parameter> peut être n'importe quelle combinaison des drapeaux suivants (avec quelques restrictions), joints avec l'opérateur - binaire OU (<literal>|</literal>). + <link linkend="language.operators.bitwise">OR binaire (|).). </para> <para> <table> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/filegroup.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/filegroup.xml diff -u phpdoc-fr/reference/filesystem/functions/filegroup.xml:1.16 phpdoc-fr/reference/filesystem/functions/filegroup.xml:1.17 --- phpdoc-fr/reference/filesystem/functions/filegroup.xml:1.16 Sat Apr 5 14:07:45 2008 +++ phpdoc-fr/reference/filesystem/functions/filegroup.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.17 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filegroup"> @@ -48,6 +48,23 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Recherche le groupe d'un fichier</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'index.php'; +print_r(posix_getgrgid(filegroup($filename))); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="errors"> &reftitle.errors; <para> @@ -67,6 +84,7 @@ <para> <simplelist> <member><function>fileowner</function></member> + <member><function>posix_getgrgid</function></member> <member><link linkend="ini.safe-mode-gid">safe_mode_gid</link></member> </simplelist> </para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fileinode.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fileinode.xml diff -u phpdoc-fr/reference/filesystem/functions/fileinode.xml:1.16 phpdoc-fr/reference/filesystem/functions/fileinode.xml:1.17 --- phpdoc-fr/reference/filesystem/functions/fileinode.xml:1.16 Sat Apr 5 14:07:45 2008 +++ phpdoc-fr/reference/filesystem/functions/fileinode.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.17 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fileinode"> @@ -44,6 +44,25 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Comparaison de l'inode d'un fichier avec le fichier courant</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'index.php'; +if (getmyinode() == fileinode($filename)) { + echo 'Vous vérifiez le fichier courant.'; +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.clearstatcache; @@ -54,6 +73,7 @@ &reftitle.seealso; <para> <simplelist> + <member><function>getmyinode</function></member> <member><function>stat</function></member> </simplelist> </para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/filemtime.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/filemtime.xml diff -u phpdoc-fr/reference/filesystem/functions/filemtime.xml:1.17 phpdoc-fr/reference/filesystem/functions/filemtime.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/filemtime.xml:1.17 Tue Apr 8 22:55:41 2008 +++ phpdoc-fr/reference/filesystem/functions/filemtime.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filemtime"> @@ -69,6 +69,7 @@ <refsect1 role="notes"> &reftitle.notes; + ¬e.filesystem-time-res; ¬e.clearstatcache; &tip.fopen-wrapper.stat; </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fileowner.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fileowner.xml diff -u phpdoc-fr/reference/filesystem/functions/fileowner.xml:1.17 phpdoc-fr/reference/filesystem/functions/fileowner.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/fileowner.xml:1.17 Sun Apr 13 15:39:03 2008 +++ phpdoc-fr/reference/filesystem/functions/fileowner.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fileowner"> @@ -46,6 +46,23 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Recherche du propriétaire d'un fichier</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'index.php'; +print_r(posix_getpwuid(fileowner($filename))); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.clearstatcache; @@ -56,7 +73,9 @@ &reftitle.seealso; <para> <simplelist> + <member><function>filegroup</function></member> <member><function>stat</function></member> + <member><function>posix_getpwuid</function></member> </simplelist> </para> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fileperms.xml?r1=1.19&r2=1.20&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fileperms.xml diff -u phpdoc-fr/reference/filesystem/functions/fileperms.xml:1.19 phpdoc-fr/reference/filesystem/functions/fileperms.xml:1.20 --- phpdoc-fr/reference/filesystem/functions/fileperms.xml:1.19 Sat Apr 5 18:52:31 2008 +++ phpdoc-fr/reference/filesystem/functions/fileperms.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.19 $ --> -<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.20 $ --> +<!-- EN-Revision: 1.14 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fileperms"> @@ -142,6 +142,7 @@ &reftitle.seealso; <para> <simplelist> + <member><function>chmod</function></member> <member><function>is_readable</function></member> <member><function>stat</function></member> </simplelist> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fnmatch.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fnmatch.xml diff -u phpdoc-fr/reference/filesystem/functions/fnmatch.xml:1.14 phpdoc-fr/reference/filesystem/functions/fnmatch.xml:1.15 --- phpdoc-fr/reference/filesystem/functions/fnmatch.xml:1.14 Sun Apr 6 09:38:39 2008 +++ phpdoc-fr/reference/filesystem/functions/fnmatch.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- EN-Revision: 1.15 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.15 $ --> +<!-- EN-Revision: 1.16 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fnmatch"> @@ -47,7 +47,7 @@ L'utilisateur moyen de Shell peut être familier avec les masques Shell, ou tout au moins, leurs expressions les plus simples, comme <literal>'?'</literal> et <literal>'*'</literal>. De cette façon, utiliser - <function>fnmatch</function> au lieu de <function>ereg</function> ou + <function>fnmatch</function> au lieu de <function>preg_match</function> pour des recherches peut être plus pratique pour les non-initiés. </para> @@ -107,7 +107,6 @@ <para> <simplelist> <member><function>glob</function></member> - <member><function>ereg</function></member> <member><function>preg_match</function></member> <member><function>sscanf</function></member> <member><function>printf</function></member> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fread.xml?r1=1.19&r2=1.20&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fread.xml diff -u phpdoc-fr/reference/filesystem/functions/fread.xml:1.19 phpdoc-fr/reference/filesystem/functions/fread.xml:1.20 --- phpdoc-fr/reference/filesystem/functions/fread.xml:1.19 Sun Apr 6 14:57:21 2008 +++ phpdoc-fr/reference/filesystem/functions/fread.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.19 $ --> -<!-- EN-Revision: 1.25 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.20 $ --> +<!-- EN-Revision: 1.26 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fread"> @@ -164,6 +164,15 @@ qui est bien plus rapide que le code ci-dessus. </para> </note> + <note> + <para> + Noter que la fonction <function>fread</function> lit la position + courante du pointeur de fichier. Utilisez la fonction + <function>ftell</function> pour trouver la position courante du pointeur + et la fonction <function>rewind</function> pour réinitiliaser la position du + pointeur. + </para> + </note> </refsect1> <refsect1 role="seealso"> @@ -179,6 +188,8 @@ <member><function>fscanf</function></member> <member><function>file</function></member> <member><function>fpassthru</function></member> + <member><function>ftell</function></member> + <member><function>rewind</function></member> </simplelist> </para> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fscanf.xml?r1=1.22&r2=1.23&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fscanf.xml diff -u phpdoc-fr/reference/filesystem/functions/fscanf.xml:1.22 phpdoc-fr/reference/filesystem/functions/fscanf.xml:1.23 --- phpdoc-fr/reference/filesystem/functions/fscanf.xml:1.22 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/fscanf.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.22 $ --> -<!-- EN-Revision: 1.19 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.23 $ --> +<!-- EN-Revision: 1.20 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fscanf"> @@ -31,6 +31,9 @@ <literal>\t</literal> dans la chaîne de format peut remplacer un espace simple dans le flux d'entrée. </para> + <para> + Chaque appel à la fonction <function>fscanf</function> lit une ligne du fichier. + </para> </refsect1> <refsect1 role="parameters"> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/ftell.xml?r1=1.15&r2=1.16&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/ftell.xml diff -u phpdoc-fr/reference/filesystem/functions/ftell.xml:1.15 phpdoc-fr/reference/filesystem/functions/ftell.xml:1.16 --- phpdoc-fr/reference/filesystem/functions/ftell.xml:1.15 Sun Apr 6 14:57:21 2008 +++ phpdoc-fr/reference/filesystem/functions/ftell.xml Sun Dec 7 21:39:20 2008 @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.16 $ --> +<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ftell"> <refnamediv> <refname>ftell</refname> - <refpurpose>Renvoie la position du pointeur du fichier</refpurpose> + <refpurpose>Renvoie la position courant du pointeur de fichier</refpurpose> </refnamediv> <refsect1 role="description"> @@ -16,7 +16,7 @@ <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> - Renvoie la position du pointeur du fichier. + Renvoie la position du pointeur courante du pointeur de fichier. </para> </refsect1> @@ -43,7 +43,8 @@ &reftitle.returnvalues; <para> Retourne la position courante du pointeur dans le - fichier repéré par le pointeur <parameter>handle</parameter>, + fichier repéré par le pointeur <parameter>handle</parameter> + sous la forme d'un entier, i.e., sa position dans le flux du fichier. </para> <para>
http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/chgrp.xml?r1=1.15&r2=1.16&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/chgrp.xml diff -u phpdoc-fr/reference/filesystem/functions/chgrp.xml:1.15 phpdoc-fr/reference/filesystem/functions/chgrp.xml:1.16 --- phpdoc-fr/reference/filesystem/functions/chgrp.xml:1.15 Sat Apr 5 14:07:45 2008 +++ phpdoc-fr/reference/filesystem/functions/chgrp.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.16 $ --> +<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.chgrp"> @@ -60,6 +60,26 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Modification de groupe d'un fichier</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'shared_file.txt'; +$format = "%s's Group ID @ %s: %d\n"; +printf($format, $filename, date('r'), filegroup($filename)); +chgrp($filename, 8); +printf($format, $filename, date('r'), filegroup($filename)); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.no-remote; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/chmod.xml?r1=1.21&r2=1.22&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/chmod.xml diff -u phpdoc-fr/reference/filesystem/functions/chmod.xml:1.21 phpdoc-fr/reference/filesystem/functions/chmod.xml:1.22 --- phpdoc-fr/reference/filesystem/functions/chmod.xml:1.21 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/chmod.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21 $ --> -<!-- EN-Revision: 1.16 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.22 $ --> +<!-- EN-Revision: 1.17 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.chmod"> @@ -128,6 +128,8 @@ <simplelist> <member><function>chown</function></member> <member><function>chgrp</function></member> + <member><function>fileperms</function></member> + <member><function>stat</function></member> </simplelist> </para> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/chown.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/chown.xml diff -u phpdoc-fr/reference/filesystem/functions/chown.xml:1.16 phpdoc-fr/reference/filesystem/functions/chown.xml:1.17 --- phpdoc-fr/reference/filesystem/functions/chown.xml:1.16 Sun Apr 6 16:55:35 2008 +++ phpdoc-fr/reference/filesystem/functions/chown.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.17 $ --> +<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.chown"> @@ -55,6 +55,55 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>chown</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +// Nom du fichier et nom d'utilisateur à utiliser +$file_name= "foo.php"; +$path = "/home/sites/php.net/public_html/sandbox" . $file_name ; +$user_name = "root"; + +// Définit l'utilisateur +chown($path, $user_name); + +// Vérification du résultat +$stat = stat($path); +print_r(posix_getpwuid($stat['uid'])); + +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +array(7) { + ["name"]=> + string(13) "php.net" + ["passwd"]=> + string(1) "x" + ["uid"]=> + int(148864) + ["gid"]=> + int(148910) + ["gecos"]=> + string(13) "php.net" + ["dir"]=> + string(25) "/home/sites/php.net" + ["shell"]=> + string(13) "/sbin/nologin" +} +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.no-remote; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/clearstatcache.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/clearstatcache.xml diff -u phpdoc-fr/reference/filesystem/functions/clearstatcache.xml:1.16 phpdoc-fr/reference/filesystem/functions/clearstatcache.xml:1.17 --- phpdoc-fr/reference/filesystem/functions/clearstatcache.xml:1.16 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/clearstatcache.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.17 $ --> +<!-- EN-Revision: 1.17 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.clearstatcache"> @@ -13,7 +13,8 @@ &reftitle.description; <methodsynopsis> <type>void</type><methodname>clearstatcache</methodname> - <void/> + <methodparam choice="opt"><type>bool</type><parameter>clear_realpath_cache</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> L'appel à la fonction <function>stat</function> ou @@ -65,6 +66,31 @@ </para> </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>clear_realpath_cache</parameter></term> + <listitem> + <para> + Si l'on doit ou non vider le cache réel (par défaut, vaut &false;). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Nettoye le cache réel d'un fichier spécifique. Ne peut être utilisé + que si le paramètre <parameter>clear_realpath_cache</parameter> vaut &true;. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> @@ -72,6 +98,72 @@ </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.3.0</entry> + <entry> + Ajout des paramètres optionnels <parameter>clear_realpath_cache</parameter> + et <parameter>filename</parameter>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>clearstatcache</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$file = 'output_log.txt'; + +function get_owner($file) +{ + $stat = stat($file); + $user = posix_getpwuid($s['uid']); + return $user['name']; +} + +$format = "UID @ %s: %s\n"; + +printf($format, date('r'), get_owner($file)); + +chown($path, 'ross'); +printf($format, date('r'), get_owner($file)); + +clearstatcache(); +printf($format, date('r'), get_owner($file)); +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +UID @ Sun, 12 Oct 2008 20:48:28 +0100: root +UID @ Sun, 12 Oct 2008 20:48:28 +0100: root +UID @ Sun, 12 Oct 2008 20:48:28 +0100: ross +]]> + </screen> + </example> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fflush.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fflush.xml diff -u phpdoc-fr/reference/filesystem/functions/fflush.xml:1.13 phpdoc-fr/reference/filesystem/functions/fflush.xml:1.14 --- phpdoc-fr/reference/filesystem/functions/fflush.xml:1.13 Sat Apr 5 14:07:45 2008 +++ phpdoc-fr/reference/filesystem/functions/fflush.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.14 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fflush"> @@ -42,6 +42,39 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Écriture d'un fichier en utilisant <function>fflush</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'bar.txt'; + +$file = fopen($filename, 'r+'); +rewind($file); +fwrite($file, 'Foo'); +fflush($file); +ftruncate($file, ftell($file)); +fclose($file); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>clearstatcache</function></member> + <member><function>fwrite</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fgetss.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fgetss.xml diff -u phpdoc-fr/reference/filesystem/functions/fgetss.xml:1.16 phpdoc-fr/reference/filesystem/functions/fgetss.xml:1.17 --- phpdoc-fr/reference/filesystem/functions/fgetss.xml:1.16 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/fgetss.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.17 $ --> +<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fgetss"> @@ -96,6 +96,44 @@ </para> </refsect1> + <refsect1 role="examples"> + <para> + <example> + <title>Lecture d'un fichier PHP ligne par ligne</title> + <programlisting role="php"> +<![CDATA[ +<?php +$str = <<<EOD +<html><body> + <p>Welcome! Today is the <?php echo(date('jS')); ?> of <?= date('F'); ?>.</p> +</body></html> +Text outside of the HTML block. +EOD; +file_put_contents('sample.php', $str); + +$handle = @fopen("sample.php", "r"); +if ($handle) { + while (!feof($handle)) { + $buffer = fgetss($handle, 4096); + echo $buffer; + } + fclose($handle); +} +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ + Welcome! Today is the of . + +Text outside of the HTML block. +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.line-endings; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fileatime.xml?r1=1.21&r2=1.22&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fileatime.xml diff -u phpdoc-fr/reference/filesystem/functions/fileatime.xml:1.21 phpdoc-fr/reference/filesystem/functions/fileatime.xml:1.22 --- phpdoc-fr/reference/filesystem/functions/fileatime.xml:1.21 Sun Apr 13 15:39:03 2008 +++ phpdoc-fr/reference/filesystem/functions/fileatime.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21 $ --> -<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.22 $ --> +<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fileatime"> @@ -84,6 +84,7 @@ Sur de telles systèmes de fichiers, cette fonction devient totalement inutile. </para> </note> + ¬e.filesystem-time-res; ¬e.clearstatcache; &tip.fopen-wrapper.stat; </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/filectime.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/filectime.xml diff -u phpdoc-fr/reference/filesystem/functions/filectime.xml:1.17 phpdoc-fr/reference/filesystem/functions/filectime.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/filectime.xml:1.17 Sun Apr 6 09:38:39 2008 +++ phpdoc-fr/reference/filesystem/functions/filectime.xml Sun Dec 7 21:39:19 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.14 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filectime"> @@ -89,6 +89,7 @@ des systèmes UNIX. </para> </note> + ¬e.filesystem-time-res; ¬e.clearstatcache; &tip.fopen-wrapper.stat; </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/file-get-contents.xml?r1=1.26&r2=1.27&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/file-get-contents.xml diff -u phpdoc-fr/reference/filesystem/functions/file-get-contents.xml:1.26 phpdoc-fr/reference/filesystem/functions/file-get-contents.xml:1.27 --- phpdoc-fr/reference/filesystem/functions/file-get-contents.xml:1.26 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/file-get-contents.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.26 $ --> -<!-- EN-Revision: 1.31 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.27 $ --> +<!-- EN-Revision: 1.32 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.file-get-contents"> @@ -72,7 +72,7 @@ <para> La valeur de <parameter>flags</parameter> peut être n'importe quelle combinaison des drapeaux suivants (avec quelques restrictions), joints avec l'opérateur - binaire OU (<literal>|</literal>). + <link linkend="language.operators.bitwise">OR binaire (|).). </para> <para> <table> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/filegroup.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/filegroup.xml diff -u phpdoc-fr/reference/filesystem/functions/filegroup.xml:1.16 phpdoc-fr/reference/filesystem/functions/filegroup.xml:1.17 --- phpdoc-fr/reference/filesystem/functions/filegroup.xml:1.16 Sat Apr 5 14:07:45 2008 +++ phpdoc-fr/reference/filesystem/functions/filegroup.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.17 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filegroup"> @@ -48,6 +48,23 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Recherche le groupe d'un fichier</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'index.php'; +print_r(posix_getgrgid(filegroup($filename))); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="errors"> &reftitle.errors; <para> @@ -67,6 +84,7 @@ <para> <simplelist> <member><function>fileowner</function></member> + <member><function>posix_getgrgid</function></member> <member><link linkend="ini.safe-mode-gid">safe_mode_gid</link></member> </simplelist> </para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fileinode.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fileinode.xml diff -u phpdoc-fr/reference/filesystem/functions/fileinode.xml:1.16 phpdoc-fr/reference/filesystem/functions/fileinode.xml:1.17 --- phpdoc-fr/reference/filesystem/functions/fileinode.xml:1.16 Sat Apr 5 14:07:45 2008 +++ phpdoc-fr/reference/filesystem/functions/fileinode.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.17 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fileinode"> @@ -44,6 +44,25 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Comparaison de l'inode d'un fichier avec le fichier courant</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'index.php'; +if (getmyinode() == fileinode($filename)) { + echo 'Vous vérifiez le fichier courant.'; +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.clearstatcache; @@ -54,6 +73,7 @@ &reftitle.seealso; <para> <simplelist> + <member><function>getmyinode</function></member> <member><function>stat</function></member> </simplelist> </para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/filemtime.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/filemtime.xml diff -u phpdoc-fr/reference/filesystem/functions/filemtime.xml:1.17 phpdoc-fr/reference/filesystem/functions/filemtime.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/filemtime.xml:1.17 Tue Apr 8 22:55:41 2008 +++ phpdoc-fr/reference/filesystem/functions/filemtime.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filemtime"> @@ -69,6 +69,7 @@ <refsect1 role="notes"> &reftitle.notes; + ¬e.filesystem-time-res; ¬e.clearstatcache; &tip.fopen-wrapper.stat; </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fileowner.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fileowner.xml diff -u phpdoc-fr/reference/filesystem/functions/fileowner.xml:1.17 phpdoc-fr/reference/filesystem/functions/fileowner.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/fileowner.xml:1.17 Sun Apr 13 15:39:03 2008 +++ phpdoc-fr/reference/filesystem/functions/fileowner.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fileowner"> @@ -46,6 +46,23 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Recherche du propriétaire d'un fichier</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'index.php'; +print_r(posix_getpwuid(fileowner($filename))); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.clearstatcache; @@ -56,7 +73,9 @@ &reftitle.seealso; <para> <simplelist> + <member><function>filegroup</function></member> <member><function>stat</function></member> + <member><function>posix_getpwuid</function></member> </simplelist> </para> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fileperms.xml?r1=1.19&r2=1.20&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fileperms.xml diff -u phpdoc-fr/reference/filesystem/functions/fileperms.xml:1.19 phpdoc-fr/reference/filesystem/functions/fileperms.xml:1.20 --- phpdoc-fr/reference/filesystem/functions/fileperms.xml:1.19 Sat Apr 5 18:52:31 2008 +++ phpdoc-fr/reference/filesystem/functions/fileperms.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.19 $ --> -<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.20 $ --> +<!-- EN-Revision: 1.14 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fileperms"> @@ -142,6 +142,7 @@ &reftitle.seealso; <para> <simplelist> + <member><function>chmod</function></member> <member><function>is_readable</function></member> <member><function>stat</function></member> </simplelist> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fnmatch.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fnmatch.xml diff -u phpdoc-fr/reference/filesystem/functions/fnmatch.xml:1.14 phpdoc-fr/reference/filesystem/functions/fnmatch.xml:1.15 --- phpdoc-fr/reference/filesystem/functions/fnmatch.xml:1.14 Sun Apr 6 09:38:39 2008 +++ phpdoc-fr/reference/filesystem/functions/fnmatch.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- EN-Revision: 1.15 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.15 $ --> +<!-- EN-Revision: 1.16 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fnmatch"> @@ -47,7 +47,7 @@ L'utilisateur moyen de Shell peut être familier avec les masques Shell, ou tout au moins, leurs expressions les plus simples, comme <literal>'?'</literal> et <literal>'*'</literal>. De cette façon, utiliser - <function>fnmatch</function> au lieu de <function>ereg</function> ou + <function>fnmatch</function> au lieu de <function>preg_match</function> pour des recherches peut être plus pratique pour les non-initiés. </para> @@ -107,7 +107,6 @@ <para> <simplelist> <member><function>glob</function></member> - <member><function>ereg</function></member> <member><function>preg_match</function></member> <member><function>sscanf</function></member> <member><function>printf</function></member> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fread.xml?r1=1.19&r2=1.20&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fread.xml diff -u phpdoc-fr/reference/filesystem/functions/fread.xml:1.19 phpdoc-fr/reference/filesystem/functions/fread.xml:1.20 --- phpdoc-fr/reference/filesystem/functions/fread.xml:1.19 Sun Apr 6 14:57:21 2008 +++ phpdoc-fr/reference/filesystem/functions/fread.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.19 $ --> -<!-- EN-Revision: 1.25 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.20 $ --> +<!-- EN-Revision: 1.26 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fread"> @@ -164,6 +164,15 @@ qui est bien plus rapide que le code ci-dessus. </para> </note> + <note> + <para> + Noter que la fonction <function>fread</function> lit la position + courante du pointeur de fichier. Utilisez la fonction + <function>ftell</function> pour trouver la position courante du pointeur + et la fonction <function>rewind</function> pour réinitiliaser la position du + pointeur. + </para> + </note> </refsect1> <refsect1 role="seealso"> @@ -179,6 +188,8 @@ <member><function>fscanf</function></member> <member><function>file</function></member> <member><function>fpassthru</function></member> + <member><function>ftell</function></member> + <member><function>rewind</function></member> </simplelist> </para> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/fscanf.xml?r1=1.22&r2=1.23&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/fscanf.xml diff -u phpdoc-fr/reference/filesystem/functions/fscanf.xml:1.22 phpdoc-fr/reference/filesystem/functions/fscanf.xml:1.23 --- phpdoc-fr/reference/filesystem/functions/fscanf.xml:1.22 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/fscanf.xml Sun Dec 7 21:39:20 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.22 $ --> -<!-- EN-Revision: 1.19 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.23 $ --> +<!-- EN-Revision: 1.20 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fscanf"> @@ -31,6 +31,9 @@ <literal>\t</literal> dans la chaîne de format peut remplacer un espace simple dans le flux d'entrée. </para> + <para> + Chaque appel à la fonction <function>fscanf</function> lit une ligne du fichier. + </para> </refsect1> <refsect1 role="parameters"> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/ftell.xml?r1=1.15&r2=1.16&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/ftell.xml diff -u phpdoc-fr/reference/filesystem/functions/ftell.xml:1.15 phpdoc-fr/reference/filesystem/functions/ftell.xml:1.16 --- phpdoc-fr/reference/filesystem/functions/ftell.xml:1.15 Sun Apr 6 14:57:21 2008 +++ phpdoc-fr/reference/filesystem/functions/ftell.xml Sun Dec 7 21:39:20 2008 @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.16 $ --> +<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ftell"> <refnamediv> <refname>ftell</refname> - <refpurpose>Renvoie la position du pointeur du fichier</refpurpose> + <refpurpose>Renvoie la position courant du pointeur de fichier</refpurpose> </refnamediv> <refsect1 role="description"> @@ -16,7 +16,7 @@ <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> - Renvoie la position du pointeur du fichier. + Renvoie la position du pointeur courante du pointeur de fichier. </para> </refsect1> @@ -43,7 +43,8 @@ &reftitle.returnvalues; <para> Retourne la position courante du pointeur dans le - fichier repéré par le pointeur <parameter>handle</parameter>, + fichier repéré par le pointeur <parameter>handle</parameter> + sous la forme d'un entier, i.e., sa position dans le flux du fichier. </para> <para>