cvs: peardoc /fr/package/fileformats/file-archive predicates.xml readers.xml
| From: | Christophe Gesch� | Date: | Wed, 16 Apr 2008 13:40:55 +0000 |
| Subject: | cvs: peardoc /fr/package/fileformats/file-archive predicates.xml readers.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-10675@lists.php.net to get a copy of this message | ||
moosh Wed Apr 16 13:40:55 2008 UTC
Modified files:
/peardoc/fr/package/fileformats/file-archive predicates.xml
readers.xml
Log:
complete translation
http://cvs.php.net/viewvc.cgi/peardoc/fr/package/fileformats/file-archive/predicates.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/fr/package/fileformats/file-archive/predicates.xml diff -u peardoc/fr/package/fileformats/file-archive/predicates.xml:1.1 peardoc/fr/package/fileformats/file-archive/predicates.xml:1.2 --- peardoc/fr/package/fileformats/file-archive/predicates.xml:1.1 Tue Apr 15 15:58:54 2008 +++ peardoc/fr/package/fileformats/file-archive/predicates.xml Wed Apr 16 13:40:55 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> -<!-- $Id: predicates.xml,v 1.1 2008/04/15 15:58:54 moosh Exp $ --> -<!-- $Revision: 1.1 $ --> +<!-- $Id: predicates.xml,v 1.2 2008/04/16 13:40:55 moosh Exp $ --> +<!-- $Revision: 1.2 $ --> <!-- EN-Revision: 1.1 Maintainer: moosh Status: started --> <refentry id="package.fileformats.file-archive.predicates"> <refnamediv> @@ -28,13 +28,13 @@ <itemizedlist> <listitem> <para> - <command>predTrue()</command>: always evaluates to true + <command>predTrue()</command>: toujours évalue à vrai </para> </listitem> <listitem> <para> - <command>predFalse()</command>: always evaluates to false + <command>predFalse()</command>: toujours évalue à faux </para> </listitem> @@ -65,21 +65,24 @@ <itemizedlist> <listitem> <para> - <command>predMinSize($size)</command>: keep only the files which size is - <literal>>= $size</literal> (in bytes). + <command>predMinSize($size)</command>: + prendre uniquement les fichiers + dont la taille + <literal>>= $size</literal> (en bytes). </para> </listitem> <listitem> <para> - <command>predMinTime($time)</command>: keep only the files that have - been modified after $time (unix timestamp). + <command>predMinTime($time)</command>: + prendre uniquement les fichiers qui + on été modifié après $time (unix timestamp). </para> </listitem> <listitem> <para> - <command>predMaxDepth($depth)</command>: keep only the files that have a + <command>predMaxDepth($depth)</command>: prendre uniquement les fichiers have a public name with less than <varname>$depth</varname> directories. </para> </listitem> @@ -95,7 +98,7 @@ <listitem> <para> - <command>predEreg($ereg)</command>: keep only the files that have a public + <command>predEreg($ereg)</command>: prendre uniquement les fichiers have a public name that matches the given regular expression. </para> </listitem> @@ -119,21 +122,23 @@ <title>Exemples de filtres</title> <programlisting role="php"><![CDATA[ <?php -//Extract all the files that contain an 'a' in their path -// or filename from a tar archive +// extraire d'un archive tart +// tous les fichiers qui contiennent un 'a' +// dans leur path ou nom de fichier File_Archive::extract( File_Archive::filter( File_Archive::predEreg('a'), File_Archive::read( - 'archive.tar/', + 'l_archive_a_lire.tar/', 'folder' ) ), File_Archive::toFiles() ); -//Compress a directory to a zip file, including only the files -//smaller than 1MB that have changed since last hour +//Compresser un répertoire en fichier zip, +//en incluant seulement les fichiers +//plus petit qu'un MB et changé dans l'heure qui précède File_Archive::extract( File_Archive::filter( File_Archive::predAnd( @@ -142,10 +147,10 @@ ), File_Archive::predMinTime(time()-3600) ), - File_Archive::read('directory') + File_Archive::read('mon_repertoire') ), File_Archive::toArchive( - 'directory.zip', + 'archive_de_mon_repertoire.zip', File_Archive::toFiles() ) ); http://cvs.php.net/viewvc.cgi/peardoc/fr/package/fileformats/file-archive/readers.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/fr/package/fileformats/file-archive/readers.xml diff -u peardoc/fr/package/fileformats/file-archive/readers.xml:1.1 peardoc/fr/package/fileformats/file-archive/readers.xml:1.2 --- peardoc/fr/package/fileformats/file-archive/readers.xml:1.1 Tue Apr 15 15:58:54 2008 +++ peardoc/fr/package/fileformats/file-archive/readers.xml Wed Apr 16 13:40:55 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> -<!-- $Id: readers.xml,v 1.1 2008/04/15 15:58:54 moosh Exp $ --> -<!-- $Revision: 1.1 $ --> +<!-- $Id: readers.xml,v 1.2 2008/04/16 13:40:55 moosh Exp $ --> +<!-- $Revision: 1.2 $ --> <!-- EN-Revision: 1.1 Maintainer: moosh Status: started --> <refentry id="package.fileformats.file-archive.readers"> <refnamediv> @@ -12,16 +12,23 @@ <refsect1 id="package.fileformats.file-archive.readers.intro"> <title>Introduction</title> <para> - A reader is an object that represents a list of files and directories. - Those files can be generated dynamically or exist physically. - For example, there is a reader class for a directory, - or for each archive format handled by <classname>File_Archive</classname>, - and they all have the same interface. - </para> - <para> - To create a reader, you will have to use the - <classname>File_Archive</classname> factory. - The important function is the <function>read</function> function: + Un reader est un objet qui représente une liste + de fichiers et répertoires. + + Ces fichiers peuvent être générés dynamiquement ou exister physiquement. + + Par exemple, il y a une classe reader pour un répertoire, + ou pour chaque format d'archive gérable par + <classname>File_Archive</classname>, + et elles ont toute la même interface. + </para> + <para> + Pour créer un lecteur, + vous devez utiliser le factory de + <classname>File_Archive</classname>. + + La function la plus importante + c'est la fonction<function>read</function>: </para> <funcsynopsis> <funcprototype> @@ -47,25 +54,26 @@ </funcprototype> </funcsynopsis> <para> - In this function the URL will represent what you want to read. + Dans cette fonction l'url représente ce que vous voulez lire. </para> <example> - <title>Generation of sources</title> + <title>Génération de sources</title> <programlisting role="php"><![CDATA[ <?php require_once "File/Archive.php"; /* -To read a directory, just give the directory name -By default, the directory and all the subdirectories -will be parsed (see $directoryDepth to change this) +Pour lire un répertoire, donnez simplement le nom +Par défaut le répertoire et ses sous-répertoires +seront parsé +(regardez $directoryDepth pour changer cela) */ $source = File_Archive::read("Path/to/dir"); /* -To read from one single file, -simply provide the name of the file +Pour lire juste un fichier, +donnez simplement son nom de fichier */ $source = File_Archive::read("Path/to/dir/file.txt"); @@ -89,23 +97,43 @@ <para> The <literal>symbolic</literal> attribute says how the files read will be displayed for future use. - If <varname>$URL</varname> is a directory, <varname>$URL</varname> will - be replaced by <varname>$symbolic</varname> (or <literal>''</literal> if - <varname>$symbolic</varname> is <literal>null</literal>). - So, in our first example, the files will be displayed as if the current - directory was <literal>'Path/to/dir'</literal>: + Si <varname>$URL</varname> est un répertoire, + <varname>$URL</varname> + sera remplacé par + <varname>$symbolic</varname> + (ou + <literal>''</literal> + si + <varname>$symbolic</varname> + est + <literal>null</literal>). + + Ainsi, + dans notre premier exemple, + les fichires seront lu comme si le répertoire courrant était + <literal>'Path/to/dir'</literal>: + Since by default <varname>$symbolic</varname> is empty, - <literal>Path/to/dir</literal> will be simply removed from the file. + <literal>Path/to/dir</literal> + will be simply removed from the file. + You may want to put <literal>Path/to/dir</literal> as <varname>$symbolic</varname> to keep the full path <literal>Path/to/dir</literal>. </para> <para> - If <varname>$URL</varname> is a file, then only the filename will be kept, - and <varname>$symbolic</varname> will be added to it. - So, in our second example, the source contains a file with symbolic name + Si <varname>$URL</varname> est un fichier, + alors seul le nom de fichier sera pris, + et + <varname>$symbolic</varname> + lui sera sera ajouté. + + Ensuite, + dans notre second exemple, + the source contains a file with symbolic name <literal>file.txt</literal>. + If a symbolic name <literal>foo</literal> had been specified, the source would contain <literal>foo/file.txt</literal>. </para> @@ -113,17 +141,22 @@ <para> The <varname>$uncompression</varname> parameter indicate how many files will be uncompressed while parsing the tree to files. - By default the files are not uncompressed. + + Par défaut les fichiers ne sont pas décompressés. + So, if you do <command>File_Archive::read('archive.tar/inner/dir', 'inner/dir')</command>, and if <filename>archive.tar</filename> contains a file called <filename>archive.tar/inner/dir/file.tgz</filename>, this second archive will appear as a file and not as a directory. - It won't be uncompressed because <varname>$uncompression</varname> is - <literal>0</literal>. + + It won't be uncompressed because <varname>$uncompression</varname> + is <literal>0</literal>. + If <varname>$uncompression</varname> is set to <literal>1</literal>, <filename>file.tgz</filename> would appear as a directory, but the files inside this archive would not be uncompressed. + If <varname>$uncompression</varname> is set to <literal>-1</literal>, all the files would be uncompressed, regardless of the depth. </para> @@ -136,8 +169,9 @@ </note> <para> - The <varname>$directoryDepth</varname> parameter gives a limit to the - number of directory read by the reader. + Le paramètre <varname>$directoryDepth</varname> + donne la limite du nombre de répertoire + pouvant être lu par le reader. </para> </refsect1> @@ -147,16 +181,19 @@ <title>Multi readers</title> <para> - Using a multi reader, you can make several sources appear as one. - You can create a multi reader using the - <command>File_Archive::readMulti()</command> function. + En utilisant un multi reader, + vous pouvez utiliser plusieurs sources comme étant unique. + + Vous pouvez créer un multi reader en utilisant la fonction + <command>File_Archive::readMulti()</command>. </para> <example> <title>Multi reader</title> <programlisting role="php"><![CDATA[ <?php -//This reader contains the content of directory and archive.tar +//Ce reader contient le contenu d'un répertoire +//et d'une archive.tar $source = File_Archive::readMulti( array( File_Archive::read('directory'), @@ -170,31 +207,38 @@ <refsect1 id="package.fileformats.file-archive.readers.readingcontent"> - <title>Reading the content of a data reader</title> + <title>Lire le contenu d'un reader de données</title> <para> - Any reader provides the following interface: + Chaque reader fourni l'interface suivante: </para> <itemizedlist> <listitem> <para><command>function next()</command></para> <para> - Go to the next file in the source. Returns <literal>false</literal> - when the end of the archive is reached. + Aller au fichier suivant dans la source. + + Retourne <literal>false</literal> + quand on a atteint la fin de l'archive. + </para> </listitem> <listitem> <para><command>function getFilename()</command></para> <para> - Returns the filename of the currently selected entry in the archive. + Retourne le nom de fichier + de l'entrée courrante + dans l'archive. </para> </listitem> <listitem> <para><command>function getStat()</command></para> <para> - Returns the stat as the <function>stat</function> function does - This function may not return a complete array, it may even return + Retourne les stat comme le fait la fonction<function>stat</function> . + + Cette fonction peut ne pas retourner un tableau complet, + parfois c'est juste <literal>array()</literal>. </para> </listitem> @@ -202,16 +246,19 @@ <listitem> <para><command>function getDataFilename()</command></para> <para> - For optimisation purposes: if the source is a physical file, - this function returns the name of the file; otherwise - it returns <literal>null</literal>. + For optimisation purposes: + if the source is a physical file, + this function returns the name of the file; + otherwise it returns + <literal>null</literal>. </para> </listitem> <listitem> <para><command>function getData($length = -1)</command></para> <para> - Reads some data from the source. + Lire des données dans la source. + This function will return a string which size is determined by the smallest of <itemizedlist> @@ -223,11 +270,12 @@ </listitem> <listitem> <para> - the end of the file. + la fin du fichier. </para> </listitem> </itemizedlist> - If the end of the file is reached, the function will return + Si la fin de fichier est atteinte, + la fonction va retourner <literal>null</literal>. </para> </listitem> @@ -235,9 +283,11 @@ <listitem> <para><command>function skip($length)</command></para> <para> - Equivalent to <command>getData($length)</command>, but does not return - any data. - Depending on the data reader, this function can be far more efficient + Equivalent to <command>getData($length)</command>, + but does not return any data. + + Depending on the data reader, + this function can be far more efficient than <function>getData</function>. </para> </listitem> @@ -247,9 +297,13 @@ <para> Should be called after having used the data reader (closes the file handles...). - This function moves the object in the same state as it was before the - first call to <function>next</function>. - After this call, you can iterate again on the data reader. + + This function moves the object in the same state + as it was before the first call to + <function>next</function>. + + After this call, + you can iterate again on the data reader. </para> </listitem> </itemizedlist> @@ -273,14 +327,18 @@ <title>Functions that use readers</title> <para> - All <classname>File_Archive</classname> functions that take a reader as an + All <classname>File_Archive</classname> + functions that take a reader as an argument also accept strings and arrays. + The strings will be automatically interpreted as a reader using <command>File_Archive::read</command> function. + The arrays will be interpreted as a multi reader. </para> <para> - Since the readers are passed by reference, you will have to pass a variable + Since the readers are passed by reference, + you will have to pass a variable and not the raw string or array. </para> <para>
http://cvs.php.net/viewvc.cgi/peardoc/fr/package/fileformats/file-archive/predicates.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/fr/package/fileformats/file-archive/predicates.xml diff -u peardoc/fr/package/fileformats/file-archive/predicates.xml:1.1 peardoc/fr/package/fileformats/file-archive/predicates.xml:1.2 --- peardoc/fr/package/fileformats/file-archive/predicates.xml:1.1 Tue Apr 15 15:58:54 2008 +++ peardoc/fr/package/fileformats/file-archive/predicates.xml Wed Apr 16 13:40:55 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> -<!-- $Id: predicates.xml,v 1.1 2008/04/15 15:58:54 moosh Exp $ --> -<!-- $Revision: 1.1 $ --> +<!-- $Id: predicates.xml,v 1.2 2008/04/16 13:40:55 moosh Exp $ --> +<!-- $Revision: 1.2 $ --> <!-- EN-Revision: 1.1 Maintainer: moosh Status: started --> <refentry id="package.fileformats.file-archive.predicates"> <refnamediv> @@ -28,13 +28,13 @@ <itemizedlist> <listitem> <para> - <command>predTrue()</command>: always evaluates to true + <command>predTrue()</command>: toujours évalue à vrai </para> </listitem> <listitem> <para> - <command>predFalse()</command>: always evaluates to false + <command>predFalse()</command>: toujours évalue à faux </para> </listitem> @@ -65,21 +65,24 @@ <itemizedlist> <listitem> <para> - <command>predMinSize($size)</command>: keep only the files which size is - <literal>>= $size</literal> (in bytes). + <command>predMinSize($size)</command>: + prendre uniquement les fichiers + dont la taille + <literal>>= $size</literal> (en bytes). </para> </listitem> <listitem> <para> - <command>predMinTime($time)</command>: keep only the files that have - been modified after $time (unix timestamp). + <command>predMinTime($time)</command>: + prendre uniquement les fichiers qui + on été modifié après $time (unix timestamp). </para> </listitem> <listitem> <para> - <command>predMaxDepth($depth)</command>: keep only the files that have a + <command>predMaxDepth($depth)</command>: prendre uniquement les fichiers have a public name with less than <varname>$depth</varname> directories. </para> </listitem> @@ -95,7 +98,7 @@ <listitem> <para> - <command>predEreg($ereg)</command>: keep only the files that have a public + <command>predEreg($ereg)</command>: prendre uniquement les fichiers have a public name that matches the given regular expression. </para> </listitem> @@ -119,21 +122,23 @@ <title>Exemples de filtres</title> <programlisting role="php"><![CDATA[ <?php -//Extract all the files that contain an 'a' in their path -// or filename from a tar archive +// extraire d'un archive tart +// tous les fichiers qui contiennent un 'a' +// dans leur path ou nom de fichier File_Archive::extract( File_Archive::filter( File_Archive::predEreg('a'), File_Archive::read( - 'archive.tar/', + 'l_archive_a_lire.tar/', 'folder' ) ), File_Archive::toFiles() ); -//Compress a directory to a zip file, including only the files -//smaller than 1MB that have changed since last hour +//Compresser un répertoire en fichier zip, +//en incluant seulement les fichiers +//plus petit qu'un MB et changé dans l'heure qui précède File_Archive::extract( File_Archive::filter( File_Archive::predAnd( @@ -142,10 +147,10 @@ ), File_Archive::predMinTime(time()-3600) ), - File_Archive::read('directory') + File_Archive::read('mon_repertoire') ), File_Archive::toArchive( - 'directory.zip', + 'archive_de_mon_repertoire.zip', File_Archive::toFiles() ) ); http://cvs.php.net/viewvc.cgi/peardoc/fr/package/fileformats/file-archive/readers.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/fr/package/fileformats/file-archive/readers.xml diff -u peardoc/fr/package/fileformats/file-archive/readers.xml:1.1 peardoc/fr/package/fileformats/file-archive/readers.xml:1.2 --- peardoc/fr/package/fileformats/file-archive/readers.xml:1.1 Tue Apr 15 15:58:54 2008 +++ peardoc/fr/package/fileformats/file-archive/readers.xml Wed Apr 16 13:40:55 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> -<!-- $Id: readers.xml,v 1.1 2008/04/15 15:58:54 moosh Exp $ --> -<!-- $Revision: 1.1 $ --> +<!-- $Id: readers.xml,v 1.2 2008/04/16 13:40:55 moosh Exp $ --> +<!-- $Revision: 1.2 $ --> <!-- EN-Revision: 1.1 Maintainer: moosh Status: started --> <refentry id="package.fileformats.file-archive.readers"> <refnamediv> @@ -12,16 +12,23 @@ <refsect1 id="package.fileformats.file-archive.readers.intro"> <title>Introduction</title> <para> - A reader is an object that represents a list of files and directories. - Those files can be generated dynamically or exist physically. - For example, there is a reader class for a directory, - or for each archive format handled by <classname>File_Archive</classname>, - and they all have the same interface. - </para> - <para> - To create a reader, you will have to use the - <classname>File_Archive</classname> factory. - The important function is the <function>read</function> function: + Un reader est un objet qui représente une liste + de fichiers et répertoires. + + Ces fichiers peuvent être générés dynamiquement ou exister physiquement. + + Par exemple, il y a une classe reader pour un répertoire, + ou pour chaque format d'archive gérable par + <classname>File_Archive</classname>, + et elles ont toute la même interface. + </para> + <para> + Pour créer un lecteur, + vous devez utiliser le factory de + <classname>File_Archive</classname>. + + La function la plus importante + c'est la fonction<function>read</function>: </para> <funcsynopsis> <funcprototype> @@ -47,25 +54,26 @@ </funcprototype> </funcsynopsis> <para> - In this function the URL will represent what you want to read. + Dans cette fonction l'url représente ce que vous voulez lire. </para> <example> - <title>Generation of sources</title> + <title>Génération de sources</title> <programlisting role="php"><![CDATA[ <?php require_once "File/Archive.php"; /* -To read a directory, just give the directory name -By default, the directory and all the subdirectories -will be parsed (see $directoryDepth to change this) +Pour lire un répertoire, donnez simplement le nom +Par défaut le répertoire et ses sous-répertoires +seront parsé +(regardez $directoryDepth pour changer cela) */ $source = File_Archive::read("Path/to/dir"); /* -To read from one single file, -simply provide the name of the file +Pour lire juste un fichier, +donnez simplement son nom de fichier */ $source = File_Archive::read("Path/to/dir/file.txt"); @@ -89,23 +97,43 @@ <para> The <literal>symbolic</literal> attribute says how the files read will be displayed for future use. - If <varname>$URL</varname> is a directory, <varname>$URL</varname> will - be replaced by <varname>$symbolic</varname> (or <literal>''</literal> if - <varname>$symbolic</varname> is <literal>null</literal>). - So, in our first example, the files will be displayed as if the current - directory was <literal>'Path/to/dir'</literal>: + Si <varname>$URL</varname> est un répertoire, + <varname>$URL</varname> + sera remplacé par + <varname>$symbolic</varname> + (ou + <literal>''</literal> + si + <varname>$symbolic</varname> + est + <literal>null</literal>). + + Ainsi, + dans notre premier exemple, + les fichires seront lu comme si le répertoire courrant était + <literal>'Path/to/dir'</literal>: + Since by default <varname>$symbolic</varname> is empty, - <literal>Path/to/dir</literal> will be simply removed from the file. + <literal>Path/to/dir</literal> + will be simply removed from the file. + You may want to put <literal>Path/to/dir</literal> as <varname>$symbolic</varname> to keep the full path <literal>Path/to/dir</literal>. </para> <para> - If <varname>$URL</varname> is a file, then only the filename will be kept, - and <varname>$symbolic</varname> will be added to it. - So, in our second example, the source contains a file with symbolic name + Si <varname>$URL</varname> est un fichier, + alors seul le nom de fichier sera pris, + et + <varname>$symbolic</varname> + lui sera sera ajouté. + + Ensuite, + dans notre second exemple, + the source contains a file with symbolic name <literal>file.txt</literal>. + If a symbolic name <literal>foo</literal> had been specified, the source would contain <literal>foo/file.txt</literal>. </para> @@ -113,17 +141,22 @@ <para> The <varname>$uncompression</varname> parameter indicate how many files will be uncompressed while parsing the tree to files. - By default the files are not uncompressed. + + Par défaut les fichiers ne sont pas décompressés. + So, if you do <command>File_Archive::read('archive.tar/inner/dir', 'inner/dir')</command>, and if <filename>archive.tar</filename> contains a file called <filename>archive.tar/inner/dir/file.tgz</filename>, this second archive will appear as a file and not as a directory. - It won't be uncompressed because <varname>$uncompression</varname> is - <literal>0</literal>. + + It won't be uncompressed because <varname>$uncompression</varname> + is <literal>0</literal>. + If <varname>$uncompression</varname> is set to <literal>1</literal>, <filename>file.tgz</filename> would appear as a directory, but the files inside this archive would not be uncompressed. + If <varname>$uncompression</varname> is set to <literal>-1</literal>, all the files would be uncompressed, regardless of the depth. </para> @@ -136,8 +169,9 @@ </note> <para> - The <varname>$directoryDepth</varname> parameter gives a limit to the - number of directory read by the reader. + Le paramètre <varname>$directoryDepth</varname> + donne la limite du nombre de répertoire + pouvant être lu par le reader. </para> </refsect1> @@ -147,16 +181,19 @@ <title>Multi readers</title> <para> - Using a multi reader, you can make several sources appear as one. - You can create a multi reader using the - <command>File_Archive::readMulti()</command> function. + En utilisant un multi reader, + vous pouvez utiliser plusieurs sources comme étant unique. + + Vous pouvez créer un multi reader en utilisant la fonction + <command>File_Archive::readMulti()</command>. </para> <example> <title>Multi reader</title> <programlisting role="php"><![CDATA[ <?php -//This reader contains the content of directory and archive.tar +//Ce reader contient le contenu d'un répertoire +//et d'une archive.tar $source = File_Archive::readMulti( array( File_Archive::read('directory'), @@ -170,31 +207,38 @@ <refsect1 id="package.fileformats.file-archive.readers.readingcontent"> - <title>Reading the content of a data reader</title> + <title>Lire le contenu d'un reader de données</title> <para> - Any reader provides the following interface: + Chaque reader fourni l'interface suivante: </para> <itemizedlist> <listitem> <para><command>function next()</command></para> <para> - Go to the next file in the source. Returns <literal>false</literal> - when the end of the archive is reached. + Aller au fichier suivant dans la source. + + Retourne <literal>false</literal> + quand on a atteint la fin de l'archive. + </para> </listitem> <listitem> <para><command>function getFilename()</command></para> <para> - Returns the filename of the currently selected entry in the archive. + Retourne le nom de fichier + de l'entrée courrante + dans l'archive. </para> </listitem> <listitem> <para><command>function getStat()</command></para> <para> - Returns the stat as the <function>stat</function> function does - This function may not return a complete array, it may even return + Retourne les stat comme le fait la fonction<function>stat</function> . + + Cette fonction peut ne pas retourner un tableau complet, + parfois c'est juste <literal>array()</literal>. </para> </listitem> @@ -202,16 +246,19 @@ <listitem> <para><command>function getDataFilename()</command></para> <para> - For optimisation purposes: if the source is a physical file, - this function returns the name of the file; otherwise - it returns <literal>null</literal>. + For optimisation purposes: + if the source is a physical file, + this function returns the name of the file; + otherwise it returns + <literal>null</literal>. </para> </listitem> <listitem> <para><command>function getData($length = -1)</command></para> <para> - Reads some data from the source. + Lire des données dans la source. + This function will return a string which size is determined by the smallest of <itemizedlist> @@ -223,11 +270,12 @@ </listitem> <listitem> <para> - the end of the file. + la fin du fichier. </para> </listitem> </itemizedlist> - If the end of the file is reached, the function will return + Si la fin de fichier est atteinte, + la fonction va retourner <literal>null</literal>. </para> </listitem> @@ -235,9 +283,11 @@ <listitem> <para><command>function skip($length)</command></para> <para> - Equivalent to <command>getData($length)</command>, but does not return - any data. - Depending on the data reader, this function can be far more efficient + Equivalent to <command>getData($length)</command>, + but does not return any data. + + Depending on the data reader, + this function can be far more efficient than <function>getData</function>. </para> </listitem> @@ -247,9 +297,13 @@ <para> Should be called after having used the data reader (closes the file handles...). - This function moves the object in the same state as it was before the - first call to <function>next</function>. - After this call, you can iterate again on the data reader. + + This function moves the object in the same state + as it was before the first call to + <function>next</function>. + + After this call, + you can iterate again on the data reader. </para> </listitem> </itemizedlist> @@ -273,14 +327,18 @@ <title>Functions that use readers</title> <para> - All <classname>File_Archive</classname> functions that take a reader as an + All <classname>File_Archive</classname> + functions that take a reader as an argument also accept strings and arrays. + The strings will be automatically interpreted as a reader using <command>File_Archive::read</command> function. + The arrays will be interpreted as a multi reader. </para> <para> - Since the readers are passed by reference, you will have to pass a variable + Since the readers are passed by reference, + you will have to pass a variable and not the raw string or array. </para> <para>