private void deleteFile() { if (Directory.Exists(strDelPath)) { DirectoryInfo dir = new DirectoryInfo(strDelPath); dir.Delete(true); } else { //如果此文件不存在则创建 Directory.CreateDirectory(strDelPath); } }
转载自 http://www.cnblogs.com/iamlucky/p/5997865.html
时间: 2024-09-28 18:19:34