Search the specified directory tree with the specified pattern. Return
an array containing all matching files (no directories included).
public search ( string $pattern, string $directory, string $type = 'php', boolean $fullpath = true, string $match = 'files' ) : array | ||
$pattern | string | the pattern to match every file with. |
$directory | string | the directory tree to search in. |
$type | string | the type of regular expression support to use, either 'php', 'perl' or 'shell'. |
$fullpath | boolean | whether the regex should be matched against the full path or only against the filename |
$match | string | can be either 'files', 'dirs' or 'both' to specify the kind of list to return |
return | array | a list of files matching the pattern parameter in the the directory path specified by the directory parameter |