private function removeFiles($files)
    {
        // Grab the duration
        $duration = $this->option('duration');
        
        // Grab the minimum acceptable timestamp
        $timestamp = time() - $duration;

        // Cycle through the list checking their creation dates
        foreach($files as $file)
        {
            // Compare the file modification times
            if(filemtime($file) < $timestamp)
            {
                // It passes the acceptable, so remove it
                unlink($file);

                // Check if the directory containing this file is empty
                if(count(scandir(dirname($file))) == 2)
                {
                    // It was empty, so just remove it
                    rmdir(dirname($file));
                }
            }
        }
    }
private function removeFiles($files)
    {
        // Grab the duration
        $duration = $this->option('duration');
        
        // Grab the minimum acceptable timestamp
        $timestamp = time() - $duration;

        // Cycle through the list checking their creation dates
        foreach($files as $file)
        {
            // Compare the file modification times
            if(filemtime($file) < $timestamp)
            {
                // It passes the acceptable, so remove it
                unlink($file);

                // Check if the directory containing this file is empty
                if(count(scandir(dirname($file))) == 2)
                {
                    // It was empty, so just remove it
                    rmdir(dirname($file));
                }
            }
        }
    }
private function removeFiles ( $ files ) { // Grab the duration $ duration = $ this -> option ( 'duration' ) ; // Grab the minimum acceptable timestamp $ timestamp = time ( ) - $ duration ; // Cycle through the list checking their creation dates foreach ( $ files as $ file ) { // Compare the file modification times if ( filemtime ( $ file ) < $ timestamp ) { // It passes the acceptable, so remove it unlink ( $ file ) ; // Check if the directory containing this file is empty if ( count ( scandir ( dirname ( $ file ) ) ) == 2 ) { // It was empty, so just remove it rmdir ( dirname ( $ file ) ) ; } } } }
Used internally in order to cycle through all of the files and remove them.

@return void
Used internally in order to cycle through all of the files and remove them .