public static void Delete(FileSystemInfo fileSystemInfo)
{
DirectoryInfo Dir = fileSystemInfo as DirectoryInfo;
if (Dir != null && Dir.Exists)
{
foreach (FileSystemInfo Child in Dir.GetFileSystemInfos())
{
Delete(Child);
}
}
// Delete the root info
fileSystemInfo.Delete();
}