string folderPath="D:\\data"
//判断文件夹是否存在
if(!Directory.Exists(folderPath))
{
//创建文件夹
Directory.CreateDirectory(folderPath);
}
string folderPath="D:\\data"
//判断文件夹是否存在
if(!Directory.Exists(folderPath))
{
//创建文件夹
Directory.CreateDirectory(folderPath);
}
本文标题:C#判断文件夹是否存在,不存在则创建
本文链接:https://www.haomeiwen.com/subject/ndcksltx.html
网友评论