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);
    }