public static void deleteSub(string Root) { DirectoryInfo directoryInfo1 = new DirectoryInfo(Root); DirectoryInfo[] directories = directoryInfo1.GetDirectories(); FileInfo[] files = directoryInfo1.GetFiles(); foreach (DirectoryInfo directoryInfo2 in directories) { Directory_Class.deleteSub(directoryInfo2.FullName); int num = 1; directoryInfo2.Delete(num != 0); } Directory_Class.Delete_Files(files); }
public void Clear_Prep() { Directory.CreateDirectory(Data); Directory_Class.Delete_Files(Data); Directory.CreateDirectory(Output); Directory_Class.Delete_Files(Output); Directory.CreateDirectory(Source); Directory_Class.deleteSub(Source); new DirectoryInfo(Source).Delete(true); Directory_Class.Delete_Files(Prep); }
public static void Delete_Files(string Root) { Directory_Class.Delete_Files(new DirectoryInfo(Root).GetFiles()); }
public static void Delete_Directory(string Root) { Directory_Class.deleteSub(Root); Directory.Delete(Root); }