/**
 * Find path names matching a given pattern.
 *
 * @param  string $pattern The pattern.
 * @param  int    $flags   Valid flags.
 *
 * @return array Returns an array containing the matched files/directories, an empty array if no file matched.
 */
public function glob(string $pattern, int $flags = 0): array

Examples

$result = $filesystem->glob('/foo/*.txt');

Getting Started

Methods

Filesystem
File
Directory