Documented the valid flags for the glob() function, including the

two new flags I added to the source (GLOB_ONLYDIR and GLOB_BRACE).

Other flags documented:

	GLOB_MARK
	GLOB_NOSORT
	GLOB_NOCHECK
	GLOB_NOESCAPE
	GLOB_BRACE
	GLOB_ONLYDIR


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@103778 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
John Coggeshall 2002-11-13 23:36:37 +00:00
parent 120af91555
commit 3be86cb45f

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.glob">
<refnamediv>
<refname>glob</refname>
@ -21,6 +21,29 @@
Returns an array containing the matched files/directories or &false; on
error.
</para>
<para> <!-- Added by john (john@php.net) //-->
Valid flags:
<itemizedlist>
<listitem>
<simpara>GLOB_MARK - Adds a slash to each item returned</simpara>
</listitem>
<listitem>
<simpara>GLOB_NOSORT - Return files as they appear in the directory (no sorting)</simpara>
</listitem>
<listitem>
<simpara>GLOB_NOCHECK - Return the search pattern if no files matching it were found</simpara>
</listitem>
<listitem>
<simpara>GLOB_NOESCAPE - Backslashes do not quote metacharacters</simpara>
</listitem>
<listitem>
<simpara>GLOB_BRACE - Expands {a,b,c} to match 'a', 'b', or 'c' (PHP >= 4.3.0)</simpara>
</listitem>
<listitem>
<simpara>GLOB_ONLYDIR - Return only directory entries which match the pattern (PHP >= 4.3.0)</simpara>
</listitem>
</itemizedlist>
</para>
<example>
<title>
Convenient way how <function>glob</function> can replace
@ -45,9 +68,7 @@ quickref.txt size 137820
<para>
See also <function>opendir</function>,
<function>readdir</function> and
<function>closedir</function>, <function>fnmatch</function>
and the unix manpage on <literal>glob(3)</literal> for flag names
(as long as they are not documented here <!-- TODO hartmut -->).
<function>closedir</function>, <function>fnmatch</function>.
</para>
</refsect1>
</refentry>