src/Lib/ProfferPath.php
public function deleteFiles($folder, $rmdir = false)
    {
        array_map('unlink', glob($folder . DS . '*'));
        if ($rmdir) {
            rmdir($folder);
        }
    }
public function deleteFiles($folder, $rmdir = false)
    {
        array_map('unlink', glob($folder . DS . '*'));
        if ($rmdir) {
            rmdir($folder);
        }
    }
public function deleteFiles ( $ folder , $ rmdir = false ) { array_map ( 'unlink' , glob ( $ folder . DS . '*' ) ) ; if ( $ rmdir ) { rmdir ( $ folder ) ; } }
Clear out a folder and optionally delete it

@param string $folder Absolute path to the folder
@param bool $rmdir If you want to remove the folder as well
@return void
Clear out a folder and optionally delete it