你的位置:首页 > 信息动态 > 新闻中心
信息动态
联系我们

C# 文件夹操作

2021/12/30 9:59:56

创建文件夹:

//判断路径是否存在

if (!Directory.Exists(Path))

{

     Directory.CreateDirectory(Path);

}

删除文件夹

   if (Directory.Exists(target))

            {

                Directory.Delete(target, true);

            }

移动文件夹

Directory.Move(path, target);