public static void ClearDirectory(string path)
{
var di = new DirectoryInfo(path);
foreach (var file in di.GetFiles())
file.Delete();
}
public static void ClearDirectory(string path)
{
var di = new DirectoryInfo(path);
di.GetFiles()[0].Delete();
}
public static void ClearDirectory(string path)
{
var di = new DirectoryInfo(path);
var _file = di.GetFiles()[0];
_file.Delete();
}
public static void ClearDirectory(string path)
{
new DirectoryInfo(path).GetFiles()[0].Delete();
}
File.Delete(path);
foreach (var f in Directory.EnumerateFiles(path, "*.*"))
File.Delete(f);
File.Delete(Directory.EnumerateFiles(path, "*.*")[0]);
Directory.Delete(path, true);