File_Find::glob()
Параметр
$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', 'perl' or 'shell').
The format of the $pattern depends on the $pattern_type-value. For more information see search methods
Возвращаемое значение
array - an array contains all filenames and name of subdirectories, which matches the pattern. Or a PEAR_Error.
Throws
Таблица 40-1. Возможные значения PEAR_Error
Error code | Error message | Reason | Solution |
---|---|---|---|
NULL | " Cannot open directory " | The given directory could not be opend. | Check typing and directory permissions. This can not be caused by a competive processing the archive with Archive_Tar |
Пример
Пример 40-1. Find all PHP files in current directory
|
Пред. | Начало | След. |
Search methods | Уровень выше | File_Find::maptree() |