Свойство | Тип | Описание | |
---|---|---|---|
$_dirs | array | internal dir-list | |
$directories | array | found dirs | |
$dirsep | string | directory separator | |
$files | array | found files |
Метод | Описание | |
---|---|---|
_build ( string $directory, string $separator = "/" ) : void | internal function to build singular directory trees, used by File_Find::maptree() | |
_determineRegex ( $pattern, string $type ) : string | internal function to determine the type of regular expression to use, implemented by File_Find::glob() and File_Find::search() | |
glob ( string $pattern, string $dirpath, string $pattern_type = 'php' ) : array | Search specified directory to find matches for specified pattern | |
isError ( &$var ) : boolean | Determine whether or not a variable is a PEAR error | |
mapTreeMultiple ( string $directory, integer $maxrecursion, $count ) : array | Map the directory tree given by the directory parameter. | |
maptree ( string $directory ) : array | Map the directory tree given by the directory_path parameter. | |
search ( string $pattern, string $directory, string $type = 'php', boolean $fullpath = true, string $match = 'files' ) : array | Search the specified directory tree with the specified pattern. Return an array containing all matching files (no directories included). |
public _determineRegex ( $pattern, string $type ) : string | ||
$type | string | given RegExp type |
Результат | string | kind of function ( "eregi", "ereg" or "preg_match") ; |
public glob ( string $pattern, string $dirpath, string $pattern_type = 'php' ) : array | ||
$pattern | string | a string containing the pattern to search the directory for. |
$dirpath | string | a string containing the directory path to search. |
$pattern_type | string | a string containing the type of pattern matching functions to use (can either be 'php', 'perl' or 'shell'). |
Результат | array | containing all of the files and directories matching the pattern or null if no matches |
public mapTreeMultiple ( string $directory, integer $maxrecursion, $count ) : array | ||
$directory | string | contains the directory path that you want to map. |
$maxrecursion | integer | maximun number of folders to recursive map |
Результат | array | a multidimensional array containing all subdirectories and their files. For example: Array ( [0] => file_1.php [1] => file_2.php [subdirname] => Array ( [0] => file_1.php ) ) |
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 |
Результат | array | a list of files matching the pattern parameter in the the directory path specified by the directory parameter |