File_Find::glob()

File_Find::glob()

File_Find::glob() -- find matches for a pattern in a directory

Description

Search the directory to find matches for 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', 'perl' or 'shell').

    The format of the $pattern depends on the $pattern_type-value. For more information see search methods

Return value

array - an array contains all filenames and name of subdirectories, which matches the pattern. Or a PEAR_Error.

Note

This function can be called statically.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.