public function files($rejectClosure = null)
    {
        // we need to filter files we don't support, lets use the collection
        $filesCollection = new Collection($this->disk->files($this->directory(), false));

        return $filesCollection->reject(function ($file) use ($rejectClosure) {
            // ensure the file ends with allowed extension
            $shouldReject = !preg_match('/.'.self::CHUNK_EXTENSION.'$/', $file);
            if ($shouldReject) {
                return true;
            }
            if (is_callable($rejectClosure)) {
                return $rejectClosure($file);
            }

            return false;
        });
    }
public function files($rejectClosure = null)
    {
        // we need to filter files we don't support, lets use the collection
        $filesCollection = new Collection($this->disk->files($this->directory(), false));

        return $filesCollection->reject(function ($file) use ($rejectClosure) {
            // ensure the file ends with allowed extension
            $shouldReject = !preg_match('/.'.self::CHUNK_EXTENSION.'$/', $file);
            if ($shouldReject) {
                return true;
            }
            if (is_callable($rejectClosure)) {
                return $rejectClosure($file);
            }

            return false;
        });
    }
public function files ( $ rejectClosure = null ) { // we need to filter files we don't support, lets use the collection $ filesCollection = new Collection ( $ this -> disk -> files ( $ this -> directory ( ) , false ) ) ; return $ filesCollection -> reject ( function ( $ file ) use ( $ rejectClosure ) { // ensure the file ends with allowed extension $ shouldReject = ! preg_match ( '/.' . self :: CHUNK_EXTENSION . '$/' , $ file ) ; if ( $ shouldReject ) { return true ; } if ( is_callable ( $ rejectClosure ) ) { return $ rejectClosure ( $ file ) ; } return false ; } ) ; }
Returns an array of files in the chunks directory.

@param \Closure|null $rejectClosure

@return Collection

@see FilesystemAdapter::files()
@see AbstractConfig::chunksStorageDirectory()
Returns an array of files in the chunks directory .