From 3be86cb45fab08fc3dd6ecc5b158b73c6c4963f9 Mon Sep 17 00:00:00 2001 From: John Coggeshall Date: Wed, 13 Nov 2002 23:36:37 +0000 Subject: [PATCH] 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 --- reference/filesystem/functions/glob.xml | 29 +++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/reference/filesystem/functions/glob.xml b/reference/filesystem/functions/glob.xml index 77663a72d5..7384414a7e 100644 --- a/reference/filesystem/functions/glob.xml +++ b/reference/filesystem/functions/glob.xml @@ -1,5 +1,5 @@ - + glob @@ -21,6 +21,29 @@ Returns an array containing the matched files/directories or &false; on error. + + Valid flags: + + + GLOB_MARK - Adds a slash to each item returned + + + GLOB_NOSORT - Return files as they appear in the directory (no sorting) + + + GLOB_NOCHECK - Return the search pattern if no files matching it were found + + + GLOB_NOESCAPE - Backslashes do not quote metacharacters + + + GLOB_BRACE - Expands {a,b,c} to match 'a', 'b', or 'c' (PHP >= 4.3.0) + + + GLOB_ONLYDIR - Return only directory entries which match the pattern (PHP >= 4.3.0) + + + 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>