Private AccessPrivate Access
This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Scans a directory for files of a certain extension.
(string) (Required) Absolute path to search.
(array|string|null) (Optional) Array of extensions to find, string of a single extension, or null for all extensions.
Default value: null
(int) (Optional) How many levels deep to search for files. Accepts 0, 1+, or -1 (infinite depth). Default 0.
(string) (Optional) The basename of the absolute path. Used to control the returned path for the found files, particularly when this function recurses to lower depths.
Default value: ''
(string|false) Array of files, keyed by the path to the file relative to the
$path directory prepended with
$relative_path, with the values being absolute paths. False otherwise.