App\services\Media::gatherFiles PHP Method

gatherFiles() public method

Gather all applicable files in a given directory.
public gatherFiles ( string $path ) : array
$path string The directory's full path
return array An array of SplFileInfo objects
    public function gatherFiles($path)
    {
        return Finder::create()->ignoreUnreadableDirs()->ignoreDotFiles((bool) config('koel.ignore_dot_files'))->files()->followLinks()->name('/\\.(mp3|ogg|m4a|flac)$/i')->in($path);
    }