PEAR Handbuch | ||
---|---|---|
Zurück | Nach vorne |
Search the current directory to find matches for the the specified pattern.
Parameter
$pattern - a string containing the pattern to search the directory for.
$dirpath - a string containing the directory path to search.
$pattern_type - a string containing the type of pattern matching functions to use (can either be 'php' or 'perl').
Returns
array - contains all filenames and name of subdirectories, which matches the pattern.
The format of the $pattern depends on the $pattern_type-value. If this value is 'php', then the pattern has to follow the conventions of the eregi_*-functions, else if the value 'perl', then follow the preg_*-patternformat. It is recommanded to use 'perl', because this is faster.
Beispiel 1. glob example
|
Search the specified directory tree with the specified pattern. Return an array containing all matching files (no directories included).
Parameter
$pattern - a string containing the pattern to search the directory for.
$dirpath - a string containing the directory path to search.
$pattern_type - a string containing the type of pattern matching functions to use (can either be 'php' or 'perl').
Returns
array - contains all filenames, which matches the pattern.
The format of the $pattern depends on the $pattern_type-value. If this value is 'php', then the pattern has to follow the conventions of the eregi_*-functions, else if the value 'perl', then follow the preg_*-patternformat. It is recommanded to use 'perl', because this is faster.
Map the directory tree given by the directory_path parameter.
Parameter
$directory - contains the directory path that you want to map
Returns
array - a two element array, the first element containing a list of all the directories, the second element containing a list of all the files.
Beispiel 2. maptree example
|
Zurück | Zum Anfang | Nach vorne |
Dateisystem | Nach oben | File_Passwd |