File.Exists(path + "a.txt")) //判断某个目录下是否存在某个文件 System.IO.Directory.Exists(@"E:\Files")) //判断文件夹是否存在,不存在则创建文件夹
} 使用非常简单吧。
转自http://www.codes51.com/article/detail_414.html
.net 平台下的File.Exists和directory .Exists()
原文:https://www.cnblogs.com/cyct/p/10663106.html