C#创建文件夹与父文件夹
// 递归判断与创建文件夹与父文件夹
1 public void CreateDirectory(string path) 2 { 3 DirectoryInfo info = new DirectoryInfo(path); 4 if (!info.Exists) 5 { 6 if (info.Parent.Exists == false) 7 { 8 CreateDirectory(info.Parent.FullName); 9 } 10 info.Create(); 11 } 12 }