1、合并文件夹路径和文件名:
Path.Combine(folderName, fileName);
\
2、创建文件夹:
Directory.CreateDirectory(path);
\
3、创建文件:
File.Create(filePath);
\
4、判断文件是否存在:
File.Exists(path);
\
5、判断文件夹是否存在:
Directory.Exists(path);
\
参考链接:
1、合并文件夹路径和文件名:
Path.Combine(folderName, fileName);
\
2、创建文件夹:
Directory.CreateDirectory(path);
\
3、创建文件:
File.Create(filePath);
\
4、判断文件是否存在:
File.Exists(path);
\
5、判断文件夹是否存在:
Directory.Exists(path);
\
参考链接: