if(Directory.Exists(directoryPath)) {//do nothing } else { Directory.CreateDirectory(directoryPath); }
其中directoryPath既可以是相对路径,也可以是绝对路径, 如果是绝对路径,它会集联创建每一层目录:)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。