DirectoryInfo d = new DirectoryInfo(path); if() // there is a file in the directory do something.
如果存在文件,我可以获取这些文件,但我还必须考虑该子文件夹路径中没有文件的可能性。
c# string directory file
c# ×1
directory ×1
file ×1
string ×1