cvs: peardoc /ru/packages/file find.xml

From: Date: Tue, 15 Jan 2002 13:55:02 +0000
Subject: cvs: peardoc /ru/packages/file find.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1956@lists.php.net to get a copy of this message
kvn Tue Jan 15 08:55:02 2002 EDT Added files: /peardoc/ru/packages/file find.xml Log: Let's go. Index: peardoc/ru/packages/file/find.xml +++ peardoc/ru/packages/file/find.xml <?xml encoding="KOI8-R"?> <!-- $Id: find.xml,v 1.1 2002/01/15 13:55:02 kvn Exp $ --> <refentry id="packages.file.find"> <refnamediv> <refname><classname>File_Find</classname></refname> <refpurpose> ÆÕÎËÃÉÉ ÏÂÝÅÇÏ ÎÁÚÎÁÞÅÎÉÑ ÄÌÑ ÐÏÉÓËÁ × ÄÅÒÅרÑÈ ËÁÔÁÌÏÇÏ×. </refpurpose> </refnamediv> <refsect1 id="packages.file.find.glob"> <title>File_Find::glob</title> <funcsynopsis> <funcprototype> <funcdef>array <function>&amp;File_Find::glob</function></funcdef> <paramdef> string <parameter>$pattern</parameter> string <parameter>$dirpath</parameter> string <parameter><optional>$pattern_type = 'php'</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> éÝÅÔ × ÔÅËÕÝÅÊ ÄÉÒÅËÔÏÒÉÉ ÄÌÑ ÕËÁÚÁÎÎÏÇÏ ÛÁÂÌÏÎÁ. </para> <para> ðÁÒÁÍÅÔÒÙ: <itemizedlist> <listitem> <para> <parameter>$pattern</parameter> - ÓÔÒÏËÁ, ÓÏÄÅÒÖÁÝÁÑ ÛÁÂÌÏÎ ÄÌÑ ÐÏÉÓËÁ. </para> </listitem> <listitem> <para> <parameter>$dirpath</parameter> - ÓÔÒÏËÁ, ÓÏÄÅÒÖÁÝÁÑ ÄÉÒÅËÔÏÒÉÀ ÄÌÑ ÐÏÉÓËÁ. </para> </listitem> <listitem> <para> <parameter>$pattern_type</parameter> - ÓÔÒÏËÁ, ÕËÁÚÙ×ÁÀÝÁÑ ÎÁ ÔÉÐ ÆÕÎËÃÉÊ ÄÌÑ ÏÂÒÁÂÏÔËÉ ÛÁÂÌÏÎÁ ÐÏÉÓËÁ (ÍÏÖÅÔ ÂÙÔØ 'php' ÉÌÉ 'perl'). </para> </listitem> </itemizedlist> </para> <para> ÷ÏÚ×ÒÁÝÁÅÔ: <itemizedlist> <listitem> <para> <parameter>array</parameter> - ÓÏÄÅÒÖÉÔ ×ÓÅ ÉÍÅÎÁ ÆÁÊÌÏ× É ÉÍÅÎÁ ÐÏÄÄÉÒÅËÔÏÒÉÊ, ËÏÔÏÒÙÅ ÓÏ×ÐÁÄÁÀÔ Ó ÛÁÂÌÏÎÏÍ. </para> </listitem> </itemizedlist> </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. </para> <example> <title>glob example</title> <programlisting role="php"> <![CDATA[ $items = &File_Find::glob( '.*\.php', "f:/php/", "perl" ) ; ]]> </programlisting> </example> </refsect1> <refsect1 id="packages.file.find.search"> <title>File_Find::search</title> <funcsynopsis> <funcprototype> <funcdef>array <function>&amp;File_Find::search</function></funcdef> <paramdef> string <parameter>$pattern</parameter> string <parameter>$dirpath</parameter> string <parameter><optional>$pattern_type = 'php'</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> Search the specified directory tree with the specified pattern. Return an array containing all matching files (no directories included). </para> <para> Parameter <itemizedlist> <listitem> <para> <parameter>$pattern</parameter> - a string containing the pattern to search the directory for. </para> </listitem> <listitem> <para> <parameter>$dirpath</parameter> - a string containing the directory path to search. </para> </listitem> <listitem> <para> <parameter>$pattern_type</parameter> - a string containing the type of pattern matching functions to use (can either be 'php' or 'perl'). </para> </listitem> </itemizedlist> </para> <para> Returns <itemizedlist> <listitem> <para> <parameter>array</parameter> - contains all filenames, which matches the pattern. </para> </listitem> </itemizedlist> </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. </para> </refsect1> <refsect1 id="packages.file.find.maptree"> <title>File_Find::maptree</title> <funcsynopsis> <funcprototype> <funcdef>array <function>&amp;File_Find::maptree</function></funcdef> <paramdef> string <parameter>$directory</parameter> </paramdef> </funcprototype> </funcsynopsis> <para> Map the directory tree given by the directory_path parameter. </para> <para> Parameter <itemizedlist> <listitem> <para> <parameter>$directory</parameter> - contains the directory path that you want to map </para> </listitem> </itemizedlist> </para> <para> Returns <itemizedlist> <listitem> <para> <parameter>array</parameter> - a two element array, the first element containing a list of all the directories, the second element containing a list of all the files. </para> </listitem> </itemizedlist> </para> <example> <title>maptree example</title> <programlisting role="php"> <![CDATA[ $find = new File_Find ; $files_dirs = &find -> maptree( "f:/pear" ) ; ]]> </programlisting> </example> </refsect1> </refentry>

« previous php.pear.cvs (#1956) next »