public static function deleteAllFilesInDirectory ($dir) {
        $dirIterator = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
        foreach (new \RecursiveIteratorIterator($dirIterator, \RecursiveIteratorIterator::CHILD_FIRST) as $file) {
            $file->isDir() ? rmdir($file) : unlink($file);
        }
    }
public static function deleteAllFilesInDirectory ($dir) {
        $dirIterator = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
        foreach (new \RecursiveIteratorIterator($dirIterator, \RecursiveIteratorIterator::CHILD_FIRST) as $file) {
            $file->isDir() ? rmdir($file) : unlink($file);
        }
    }
public static function deleteAllFilesInDirectory ( $ dir ) { $ dirIterator = new \ RecursiveDirectoryIterator ( $ dir , \ FilesystemIterator :: SKIP_DOTS ) ; foreach ( new \ RecursiveIteratorIterator ( $ dirIterator , \ RecursiveIteratorIterator :: CHILD_FIRST ) as $ file ) { $ file -> isDir ( ) ? rmdir ( $ file ) : unlink ( $ file ) ; } }
Deletes all files in directory.

@internal for internal use only

@param String $dir
Deletes all files in directory .