cvs: peardoc /en/package/filesystem file-find.xml /en/package/filesystem/file-find glob.xml search.xml searchmethods.xml
| From: | anatoly techtonik | Date: | Tue, 13 Sep 2005 23:45:14 +0000 |
| Subject: | cvs: peardoc /en/package/filesystem file-find.xml /en/package/filesystem/file-find glob.xml search.xml searchmethods.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-6811@lists.php.net to get a copy of this message | ||
techtonik Tue Sep 13 19:45:14 2005 EDT
Added files:
/peardoc/en/package/filesystem/file-find searchmethods.xml
Modified files:
/peardoc/en/package/filesystem file-find.xml
/peardoc/en/package/filesystem/file-find glob.xml search.xml
Log:
+ document new 'shell' match method
http://cvs.php.net/diff.php/peardoc/en/package/filesystem/file-find.xml?r1=1.3&r2=1.4&ty=u Index: peardoc/en/package/filesystem/file-find.xml diff -u peardoc/en/package/filesystem/file-find.xml:1.3 peardoc/en/package/filesystem/file-find.xml:1.4 --- peardoc/en/package/filesystem/file-find.xml:1.3 Fri Sep 9 11:40:48 2005 +++ peardoc/en/package/filesystem/file-find.xml Tue Sep 13 19:45:13 2005 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <sect1 id="package.filesystem.file-find"> <title>File_Find</title> @@ -6,6 +6,7 @@ Commonly needed functions to search for files and directories </para> + &package.filesystem.file-find.searchmethods; &package.filesystem.file-find.glob; &package.filesystem.file-find.maptree; &package.filesystem.file-find.maptreemultiple; http://cvs.php.net/diff.php/peardoc/en/package/filesystem/file-find/glob.xml?r1=1.5&r2=1.6&ty=u Index: peardoc/en/package/filesystem/file-find/glob.xml diff -u peardoc/en/package/filesystem/file-find/glob.xml:1.5 peardoc/en/package/filesystem/file-find/glob.xml:1.6 --- peardoc/en/package/filesystem/file-find/glob.xml:1.5 Fri Sep 9 11:02:49 2005 +++ peardoc/en/package/filesystem/file-find/glob.xml Tue Sep 13 19:45:13 2005 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="package.filesystem.file-find.glob"> <refnamediv> <refname>File_Find::glob()</refname> @@ -47,16 +47,12 @@ <listitem> <para> <parameter>$pattern_type</parameter> - a string containing the type - of pattern matching functions to use (can either be 'php' or 'perl'). + of pattern matching functions to use (can either be 'php', 'perl' or 'shell'). </para> <para> The format of the <parameter>$pattern</parameter> depends on the - <parameter>$pattern_type</parameter>-value. If this value is - <parameter>'php'</parameter>, then the pattern has to follow the - conventions of the eregi_*-functions, else if the value - <parameter>'perl'</parameter>, then follow the preg_*-patternformat. - It is recommanded to use <parameter>'perl'</parameter>, because this - is faster. + <parameter>$pattern_type</parameter>-value. For more information see + <link linkend="package.filesystem.file-find.searchmethods">search methods</link> </para> </listitem> </itemizedlist> http://cvs.php.net/diff.php/peardoc/en/package/filesystem/file-find/search.xml?r1=1.2&r2=1.3&ty=u Index: peardoc/en/package/filesystem/file-find/search.xml diff -u peardoc/en/package/filesystem/file-find/search.xml:1.2 peardoc/en/package/filesystem/file-find/search.xml:1.3 --- peardoc/en/package/filesystem/file-find/search.xml:1.2 Fri Sep 9 11:38:55 2005 +++ peardoc/en/package/filesystem/file-find/search.xml Tue Sep 13 19:45:13 2005 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.filesystem.file-find.search"> <refnamediv> <refname>File_Find::search()</refname> @@ -19,7 +19,14 @@ string <parameter>$dirpath</parameter> </paramdef> <paramdef> - string <parameter><optional>$pattern_type = 'php'</optional></parameter> </paramdef> + string <parameter><optional>$pattern_type = 'php'</optional></parameter> + </paramdef> + <paramdef> + bool <parameter><optional>$fullpath = true</optional></parameter> + </paramdef> + <paramdef> + string <parameter><optional>$match = 'files'</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -48,18 +55,26 @@ <listitem> <para> <parameter>$pattern_type</parameter> - a string containing the type - of pattern matching functions to use (can either be 'php' or 'perl'). + of pattern matching functions to use (can either be 'php', 'perl' or 'shell'). </para> <para> The format of the <parameter>$pattern</parameter> depends on the - <parameter>$pattern_type</parameter>-value. If this value is - <parameter>'php'</parameter>, then the pattern has to follow the - conventions of the eregi_*-functions, else if the value - <parameter>'perl'</parameter>, then follow the preg_*-patternformat. - It is recommanded to use <parameter>'perl'</parameter>, because this - is faster. + <parameter>$pattern_type</parameter>-value. For more information see + <link linkend="package.filesystem.file-find.searchmethods">search methods</link> </para> </listitem> + <listitem> + <para> + <parameter>$fullpath</parameter> - whether the string should be + matched against the full path or only against the filename + </para> + </listitem> + <listitem> + <para> + <parameter>$match</parameter> - can be either 'files', 'dirs' or + 'both' to specify the kind of list to return + </para> + </listitem> </itemizedlist> </para> </refsect1> http://cvs.php.net/co.php/peardoc/en/package/filesystem/file-find/searchmethods.xml?r=1.1&p=1 Index: peardoc/en/package/filesystem/file-find/searchmethods.xml +++ peardoc/en/package/filesystem/file-find/searchmethods.xml <!-- $Revision: 1.1 $ --> <refentry id="package.filesystem.file-find.searchmethods"> <refnamediv> <refname>Search methods</refname> <refpurpose> Types of methods what can be used in search functions below </refpurpose> </refnamediv> <refsect1> <title>Search methods and their patterns</title> <para> All search functions use <parameter>$pattern</parameter> parameter to specify match for filenames. The format of the <parameter>$pattern</parameter> depends on value of another parameter <parameter>$pattern_type</parameter> <itemizedlist> <listitem> <simpara> If this value is <parameter>'php'</parameter>, then the pattern is case-sensitive string which follows the conventions of the ereg_*-functions. </simpara> </listitem> <listitem> <simpara> In case of <parameter>'perl'</parameter> pattern type it must follow the preg_*-patternformat. It is recommanded to use <parameter>'perl'</parameter>, because this is faster. </simpara> </listitem> <listitem> <simpara> And the last <parameter>'shell'</parameter> mode, most simple which should be familiar to everybody, who has basic computer skills. It is as easy as windows approach, but has some additional concepts borrowed from the FAR Manager software. The text of the following chapter is copy/paste from it's documentation. </simpara> </listitem> </itemizedlist> </para> </refsect1> <refsect1> <title>'shell' search mode file masks</title> <para> File masks are used to select single files and folders or groups of them. Masks may contain common valid file name symbols, wildcards ('*' and '?') and special expressions: <simplelist type='horiz' columns='2'> <member><emphasis>*</emphasis></member> <member>any number of characters;</member> <member><emphasis>?</emphasis></member> <member>any single character;</member> <member><emphasis>[c,x-z]</emphasis></member> <member>any character enclosed by the brackets. Both separate characters and character intervals are allowed. </member> </simplelist> For example, files ftp.exe, fc.exe and f.ext may be selected using mask f*.ex?, mask *co* will select both color.ini and edit.com, mask [c-f,t]*.txt can select config.txt, demo.txt, faq.txt and tips.txt. </para> <para> You may enter several file masks separated with commas or semicolons. For example, to select all the documents, you can specify *.doc,*.txt,*.wri in search pattern. </para> <!-- <para> You may enclose any mask (but not the entire list) in quotes. For example, you have to do this when a mask contains any of the delimiter characters (a comma or a semicolon), so that the mask doesn't get confused with a list. </para> --> <para> You may use <emphasis>exclude masks</emphasis>. An exclude mask is one or multiple file masks that must not be matched by the files matching the mask. The exclude mask is delimited from the main mask by the character '<emphasis>|</emphasis>'. </para> <para> Usage examples of exclude masks: <orderedlist> <listitem><para>*.cpp</para> <simpara> All files with the extension <emphasis>cpp</emphasis>. </simpara> </listitem> <listitem><para>*.*|*.bak,*.tmp</para> <simpara> All files except for the files with extensions <emphasis>bak</emphasis> and <emphasis>tmp</emphasis>. </simpara> </listitem> <listitem><para>*.*|</para> <simpara> This mask has an error - the character | is entered, but the mask itself is not specified. </simpara> </listitem> <listitem><para>*.*|*.bak|*.tmp</para> <simpara> Also an error - the character | may not be contained in the mask more than once. </simpara> </listitem> <listitem><para>|*.bak</para> <simpara> The same as *|*.bak </simpara> </listitem> </orderedlist> The comma (or semicolon) is used for separating file masks from each other, and the '|' character separates include masks from exclude masks. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
http://cvs.php.net/diff.php/peardoc/en/package/filesystem/file-find.xml?r1=1.3&r2=1.4&ty=u Index: peardoc/en/package/filesystem/file-find.xml diff -u peardoc/en/package/filesystem/file-find.xml:1.3 peardoc/en/package/filesystem/file-find.xml:1.4 --- peardoc/en/package/filesystem/file-find.xml:1.3 Fri Sep 9 11:40:48 2005 +++ peardoc/en/package/filesystem/file-find.xml Tue Sep 13 19:45:13 2005 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <sect1 id="package.filesystem.file-find"> <title>File_Find</title> @@ -6,6 +6,7 @@ Commonly needed functions to search for files and directories </para> + &package.filesystem.file-find.searchmethods; &package.filesystem.file-find.glob; &package.filesystem.file-find.maptree; &package.filesystem.file-find.maptreemultiple; http://cvs.php.net/diff.php/peardoc/en/package/filesystem/file-find/glob.xml?r1=1.5&r2=1.6&ty=u Index: peardoc/en/package/filesystem/file-find/glob.xml diff -u peardoc/en/package/filesystem/file-find/glob.xml:1.5 peardoc/en/package/filesystem/file-find/glob.xml:1.6 --- peardoc/en/package/filesystem/file-find/glob.xml:1.5 Fri Sep 9 11:02:49 2005 +++ peardoc/en/package/filesystem/file-find/glob.xml Tue Sep 13 19:45:13 2005 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="package.filesystem.file-find.glob"> <refnamediv> <refname>File_Find::glob()</refname> @@ -47,16 +47,12 @@ <listitem> <para> <parameter>$pattern_type</parameter> - a string containing the type - of pattern matching functions to use (can either be 'php' or 'perl'). + of pattern matching functions to use (can either be 'php', 'perl' or 'shell'). </para> <para> The format of the <parameter>$pattern</parameter> depends on the - <parameter>$pattern_type</parameter>-value. If this value is - <parameter>'php'</parameter>, then the pattern has to follow the - conventions of the eregi_*-functions, else if the value - <parameter>'perl'</parameter>, then follow the preg_*-patternformat. - It is recommanded to use <parameter>'perl'</parameter>, because this - is faster. + <parameter>$pattern_type</parameter>-value. For more information see + <link linkend="package.filesystem.file-find.searchmethods">search methods</link> </para> </listitem> </itemizedlist> http://cvs.php.net/diff.php/peardoc/en/package/filesystem/file-find/search.xml?r1=1.2&r2=1.3&ty=u Index: peardoc/en/package/filesystem/file-find/search.xml diff -u peardoc/en/package/filesystem/file-find/search.xml:1.2 peardoc/en/package/filesystem/file-find/search.xml:1.3 --- peardoc/en/package/filesystem/file-find/search.xml:1.2 Fri Sep 9 11:38:55 2005 +++ peardoc/en/package/filesystem/file-find/search.xml Tue Sep 13 19:45:13 2005 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.filesystem.file-find.search"> <refnamediv> <refname>File_Find::search()</refname> @@ -19,7 +19,14 @@ string <parameter>$dirpath</parameter> </paramdef> <paramdef> - string <parameter><optional>$pattern_type = 'php'</optional></parameter> </paramdef> + string <parameter><optional>$pattern_type = 'php'</optional></parameter> + </paramdef> + <paramdef> + bool <parameter><optional>$fullpath = true</optional></parameter> + </paramdef> + <paramdef> + string <parameter><optional>$match = 'files'</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -48,18 +55,26 @@ <listitem> <para> <parameter>$pattern_type</parameter> - a string containing the type - of pattern matching functions to use (can either be 'php' or 'perl'). + of pattern matching functions to use (can either be 'php', 'perl' or 'shell'). </para> <para> The format of the <parameter>$pattern</parameter> depends on the - <parameter>$pattern_type</parameter>-value. If this value is - <parameter>'php'</parameter>, then the pattern has to follow the - conventions of the eregi_*-functions, else if the value - <parameter>'perl'</parameter>, then follow the preg_*-patternformat. - It is recommanded to use <parameter>'perl'</parameter>, because this - is faster. + <parameter>$pattern_type</parameter>-value. For more information see + <link linkend="package.filesystem.file-find.searchmethods">search methods</link> </para> </listitem> + <listitem> + <para> + <parameter>$fullpath</parameter> - whether the string should be + matched against the full path or only against the filename + </para> + </listitem> + <listitem> + <para> + <parameter>$match</parameter> - can be either 'files', 'dirs' or + 'both' to specify the kind of list to return + </para> + </listitem> </itemizedlist> </para> </refsect1> http://cvs.php.net/co.php/peardoc/en/package/filesystem/file-find/searchmethods.xml?r=1.1&p=1 Index: peardoc/en/package/filesystem/file-find/searchmethods.xml +++ peardoc/en/package/filesystem/file-find/searchmethods.xml <!-- $Revision: 1.1 $ --> <refentry id="package.filesystem.file-find.searchmethods"> <refnamediv> <refname>Search methods</refname> <refpurpose> Types of methods what can be used in search functions below </refpurpose> </refnamediv> <refsect1> <title>Search methods and their patterns</title> <para> All search functions use <parameter>$pattern</parameter> parameter to specify match for filenames. The format of the <parameter>$pattern</parameter> depends on value of another parameter <parameter>$pattern_type</parameter> <itemizedlist> <listitem> <simpara> If this value is <parameter>'php'</parameter>, then the pattern is case-sensitive string which follows the conventions of the ereg_*-functions. </simpara> </listitem> <listitem> <simpara> In case of <parameter>'perl'</parameter> pattern type it must follow the preg_*-patternformat. It is recommanded to use <parameter>'perl'</parameter>, because this is faster. </simpara> </listitem> <listitem> <simpara> And the last <parameter>'shell'</parameter> mode, most simple which should be familiar to everybody, who has basic computer skills. It is as easy as windows approach, but has some additional concepts borrowed from the FAR Manager software. The text of the following chapter is copy/paste from it's documentation. </simpara> </listitem> </itemizedlist> </para> </refsect1> <refsect1> <title>'shell' search mode file masks</title> <para> File masks are used to select single files and folders or groups of them. Masks may contain common valid file name symbols, wildcards ('*' and '?') and special expressions: <simplelist type='horiz' columns='2'> <member><emphasis>*</emphasis></member> <member>any number of characters;</member> <member><emphasis>?</emphasis></member> <member>any single character;</member> <member><emphasis>[c,x-z]</emphasis></member> <member>any character enclosed by the brackets. Both separate characters and character intervals are allowed. </member> </simplelist> For example, files ftp.exe, fc.exe and f.ext may be selected using mask f*.ex?, mask *co* will select both color.ini and edit.com, mask [c-f,t]*.txt can select config.txt, demo.txt, faq.txt and tips.txt. </para> <para> You may enter several file masks separated with commas or semicolons. For example, to select all the documents, you can specify *.doc,*.txt,*.wri in search pattern. </para> <!-- <para> You may enclose any mask (but not the entire list) in quotes. For example, you have to do this when a mask contains any of the delimiter characters (a comma or a semicolon), so that the mask doesn't get confused with a list. </para> --> <para> You may use <emphasis>exclude masks</emphasis>. An exclude mask is one or multiple file masks that must not be matched by the files matching the mask. The exclude mask is delimited from the main mask by the character '<emphasis>|</emphasis>'. </para> <para> Usage examples of exclude masks: <orderedlist> <listitem><para>*.cpp</para> <simpara> All files with the extension <emphasis>cpp</emphasis>. </simpara> </listitem> <listitem><para>*.*|*.bak,*.tmp</para> <simpara> All files except for the files with extensions <emphasis>bak</emphasis> and <emphasis>tmp</emphasis>. </simpara> </listitem> <listitem><para>*.*|</para> <simpara> This mask has an error - the character | is entered, but the mask itself is not specified. </simpara> </listitem> <listitem><para>*.*|*.bak|*.tmp</para> <simpara> Also an error - the character | may not be contained in the mask more than once. </simpara> </listitem> <listitem><para>|*.bak</para> <simpara> The same as *|*.bak </simpara> </listitem> </orderedlist> The comma (or semicolon) is used for separating file masks from each other, and the '|' character separates include masks from exclude masks. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->