mfischer                Sat May 18 10:08:25 2002 EDT

  Added files:                 
    /phpdoc/en/reference/filesystem/functions   glob.xml 

  Modified files:              
    /phpdoc/en/reference/filesystem     functions.xml 
  Log:
  - Preliminary documentation for glob().
  # Far from finished, volunteers are welcome:
  # - Document tll he flags
  # - Give more examples
  # - Describe what the patterns are really
  
  
Index: phpdoc/en/reference/filesystem/functions.xml
diff -u phpdoc/en/reference/filesystem/functions.xml:1.1 
phpdoc/en/reference/filesystem/functions.xml:1.2
--- phpdoc/en/reference/filesystem/functions.xml:1.1    Sun Apr 14 20:00:43 2002
+++ phpdoc/en/reference/filesystem/functions.xml        Sat May 18 10:08:25 2002
@@ -41,6 +41,7 @@
 &reference.filesystem.functions.ftell;
 &reference.filesystem.functions.ftruncate;
 &reference.filesystem.functions.fwrite;
+&reference.filesystem.functions.glob;
 &reference.filesystem.functions.is-dir;
 &reference.filesystem.functions.is-executable;
 &reference.filesystem.functions.is-file;

Index: phpdoc/en/reference/filesystem/functions/glob.xml
+++ phpdoc/en/reference/filesystem/functions/glob.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
  <refentry id="function.glob">
   <refnamediv>
    <refname>glob</refname> 
    <refpurpose>Find pathnames matching a pattern</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <methodsynopsis>
     <type>array</type><methodname>glob</methodname>
     <methodparam><type>string</type><parameter>pattern</parameter></methodparam>
     <methodparam 
choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
    </methodsynopsis>
    <para>
     The <function>glob</function> function searches for all the pathnames
     matching <parameter>pattern</parameter> according to the rules used by
     the shell. No tilde expansion or parameter substitution is done.
    </para>
    <para>
     Returns an array containing the matched files/directories or &false; on
     error.
    </para>
    <note>
     <para>
      This function is disabled in <link
      linkend="ini.safe-mode">safe mode</link>.
     </para>
    </note>
    <warning>
     <para>
      This function is not available on the Windows platform.
     </para>
    </warning>
    <example>
     <title>
      Convenient way how <function>glob</function> can replace
      <function>opendir</function> and friends.
     </title>
     <programlisting role="php">
<![CDATA[
foreach (glob("*.txt") as $filename) {
    echo "$filename size " . filesize($filename) . "\n";
}
]]>
     </programlisting>
     <para>
      This could result in the following output:
     </para>
     <screen>
funclist.txt size 44686
funcsummary.txt size 267625
quickref.txt size 137820
     </screen>
    </example>
    <para>
     See also <function>opendir</function>,
     <function>readdir</function> and
     <function>closedir</function>.
    </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
indent-tabs-mode:nil
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
-->


Reply via email to