- Patch #623276 by jhodgdon: fixed documentation for file_scan_directory() is incorrect.
parent
414c8f8bad
commit
cc13b34703
|
@ -1576,34 +1576,30 @@ function file_download() {
|
||||||
* from being scanned.
|
* from being scanned.
|
||||||
*
|
*
|
||||||
* @param $dir
|
* @param $dir
|
||||||
* The base directory or URI for the scan, without trailing slash.
|
* The base directory or URI to scan, without trailing slash.
|
||||||
* @param $mask
|
* @param $mask
|
||||||
* The preg_match() regular expression of the files to find.
|
* The preg_match() regular expression of the files to find.
|
||||||
* @param $options
|
* @param $options
|
||||||
* An associative array of additional options, with the following keys:
|
* An associative array of additional options, with the following elements:
|
||||||
* - 'nomask'
|
* - 'nomask': The preg_match() regular expression of the files to ignore.
|
||||||
* The preg_match() regular expression of the files to ignore. Defaults to
|
* Defaults to '/(\.\.?|CVS)$/'.
|
||||||
* '/(\.\.?|CVS)$/'.
|
* - 'callback': The callback function to call for each match. There is no
|
||||||
* - 'callback'
|
* default callback.
|
||||||
* The callback function to call for each match. There is no default
|
* - 'recurse': When TRUE, the directory scan will recurse the entire tree
|
||||||
* callback.
|
* starting at the provided directory. Defaults to TRUE.
|
||||||
* - 'recurse'
|
* - 'key': The key to be used for the returned associative array of files.
|
||||||
* When TRUE, the directory scan will recurse the entire tree starting at
|
* Possible values are 'uri', for the file's URI; 'filename', for the
|
||||||
* the provided directory. Defaults to TRUE.
|
* basename of the file; and 'name' for the name of the file without the
|
||||||
* - 'key'
|
* extension. Defaults to 'uri'.
|
||||||
* The key to be used for the returned array of files. Possible values are
|
* - 'min_depth': Minimum depth of directories to return files from. Defaults
|
||||||
* 'filepath', for the path starting with $dir, 'filename', for the
|
* to 0.
|
||||||
* basename of the file, and 'name' for the name of the file without an
|
|
||||||
* extension. Defaults to 'filepath'.
|
|
||||||
* - 'min_depth'
|
|
||||||
* Minimum depth of directories to return files from. Defaults to 0.
|
|
||||||
* @param $depth
|
* @param $depth
|
||||||
* Current depth of recursion. This parameter is only used internally and
|
* Current depth of recursion. This parameter is only used internally and
|
||||||
* should not be passed.
|
* should not be passed in.
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
* An associative array (keyed on the provided key) of objects with
|
* An associative array (keyed on the chosen key) of objects with 'uri',
|
||||||
* 'uri', 'filename', and 'name' members corresponding to the
|
* 'filename', and 'name' members corresponding to the matching files.
|
||||||
* matching files.
|
|
||||||
*/
|
*/
|
||||||
function file_scan_directory($dir, $mask, $options = array(), $depth = 0) {
|
function file_scan_directory($dir, $mask, $options = array(), $depth = 0) {
|
||||||
// Merge in defaults.
|
// Merge in defaults.
|
||||||
|
|
Loading…
Reference in New Issue