public function oldChunkFiles()
    {
        $files = $this->files();
        // if there are no files, lets return the empty collection
        if ($files->isEmpty()) {
            return $files;
        }

        // build the timestamp
        $timeToCheck = strtotime($this->config->clearTimestampString());
        $collection = new Collection();

        // filter the collection with files that are not correct chunk file
        // loop all current files and filter them by the time
        $files->each(function ($file) use ($timeToCheck, $collection) {
            // get the last modified time to check if the chunk is not new
            $modified = $this->disk()->lastModified($file);

            // delete only old chunk
            if ($modified < $timeToCheck) {
                $collection->push(new ChunkFile($file, $modified, $this));
            }
        });

        return $collection;
    }
public function oldChunkFiles()
    {
        $files = $this->files();
        // if there are no files, lets return the empty collection
        if ($files->isEmpty()) {
            return $files;
        }

        // build the timestamp
        $timeToCheck = strtotime($this->config->clearTimestampString());
        $collection = new Collection();

        // filter the collection with files that are not correct chunk file
        // loop all current files and filter them by the time
        $files->each(function ($file) use ($timeToCheck, $collection) {
            // get the last modified time to check if the chunk is not new
            $modified = $this->disk()->lastModified($file);

            // delete only old chunk
            if ($modified < $timeToCheck) {
                $collection->push(new ChunkFile($file, $modified, $this));
            }
        });

        return $collection;
    }
public function oldChunkFiles ( ) { $ files = $ this -> files ( ) ; // if there are no files, lets return the empty collection if ( $ files -> isEmpty ( ) ) { return $ files ; } // build the timestamp $ timeToCheck = strtotime ( $ this -> config -> clearTimestampString ( ) ) ; $ collection = new Collection ( ) ; // filter the collection with files that are not correct chunk file // loop all current files and filter them by the time $ files -> each ( function ( $ file ) use ( $ timeToCheck , $ collection ) { // get the last modified time to check if the chunk is not new $ modified = $ this -> disk ( ) -> lastModified ( $ file ) ; // delete only old chunk if ( $ modified < $ timeToCheck ) { $ collection -> push ( new ChunkFile ( $ file , $ modified , $ this ) ) ; } } ) ; return $ collection ; }
Returns the old chunk files.

@return Collection<ChunkFile> collection of a ChunkFile objects
Returns the old chunk files .