static function Delete($dir)
    {
        $files = self::GetFileSystemEntries($dir);
        
        foreach($files as $file)
        {
            $path = Path::Combine($dir, $file);
            switch(self::GetFileSystemEntryType($path))
            {
                case FileSystemEntryType::File():
                case FileSystemEntryType::Link():
                    unlink($path);
                    break;
                
                case FileSystemEntryType::Folder():
                    self::Delete($path);
                    break;
            }
        }
        rmdir($dir);
    }
static function Delete($dir)
    {
        $files = self::GetFileSystemEntries($dir);
        
        foreach($files as $file)
        {
            $path = Path::Combine($dir, $file);
            switch(self::GetFileSystemEntryType($path))
            {
                case FileSystemEntryType::File():
                case FileSystemEntryType::Link():
                    unlink($path);
                    break;
                
                case FileSystemEntryType::Folder():
                    self::Delete($path);
                    break;
            }
        }
        rmdir($dir);
    }
static function Delete ( $ dir ) { $ files = self :: GetFileSystemEntries ( $ dir ) ; foreach ( $ files as $ file ) { $ path = Path :: Combine ( $ dir , $ file ) ; switch ( self :: GetFileSystemEntryType ( $ path ) ) { case FileSystemEntryType :: File ( ) : case FileSystemEntryType :: Link ( ) : unlink ( $ path ) ; break ; case FileSystemEntryType :: Folder ( ) : self :: Delete ( $ path ) ; break ; } } rmdir ( $ dir ) ; }
Deletes a folder and all of its contents
@param string $dir
Deletes a folder and all of its contents