创建文件夹:
//判断路径是否存在
if (!Directory.Exists(Path))
{
Directory.CreateDirectory(Path);
}
删除文件夹
if (Directory.Exists(target))
{
Directory.Delete(target, true);
}
移动文件夹
Directory.Move(path, target);
2022-02-08 03:58:28
//判断路径是否存在
if (!Directory.Exists(Path))
{
Directory.CreateDirectory(Path);
}
if (Directory.Exists(target))
{
Directory.Delete(target, true);
}
Directory.Move(path, target);