*/ public function find(string $glob): Promise { return coroutine(function () use ($glob) { $uris = []; foreach (new GlobIterator($glob) as $path) { // Exclude any directories that also match the glob pattern if (!is_dir($path)) { $uris[] = pathToUri($path); } yield timeout(); } return $uris; }); } }