createDir static method
同步创建文件夹
Implementation
static Directory? createDir(String? path) {
if (path == null || path.isEmpty) {
return null;
}
Directory dir = Directory(path);
if (!dir.existsSync()) {
dir.createSync(recursive: true);
}
return dir;
}