Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
cc13b347
Commit
cc13b347
authored
Nov 5, 2009
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#623276
by jhodgdon: fixed documentation for file_scan_directory() is incorrect.
parent
414c8f8b
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/file.inc
+18
-22
18 additions, 22 deletions
includes/file.inc
with
18 additions
and
22 deletions
includes/file.inc
+
18
−
22
View file @
cc13b347
...
@@ -1576,34 +1576,30 @@ function file_download() {
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment