string path = @"D:\abc"; string fileName = "123.txt";
if (!Directory.Exists(path)) { Directory.CreateDirectory(path); }
if (!File.Exists(path + "\\" + fileName)) { File.Create(path + "\\" + fileName); }
微信扫一扫
string path = @"D:\abc"; string fileName = "123.txt";
if (!Directory.Exists(path)) { Directory.CreateDirectory(path); }
if (!File.Exists(path + "\\" + fileName)) { File.Create(path + "\\" + fileName); }
相关推荐