File::glob PHP Method

glob() public static method

Find path names matching a given pattern.
public static glob ( string $pattern, integer $flags ) : array
$pattern string
$flags integer
return array
        public static function glob($pattern, $flags = 0)
        {
            return \Illuminate\Filesystem\Filesystem::glob($pattern, $flags);
        }

Usage Example

Beispiel #1
0
 /**
  * @return \Illuminate\Support\Collection
  */
 private function resetIndexes()
 {
     $storagePath = str_finish(realpath(storage_path()), DIRECTORY_SEPARATOR) . '*.index';
     return collect(\File::glob($storagePath))->each(function ($index) {
         unlink($index);
     });
 }
All Usage Examples Of File::glob