createFolder static method

Future<bool> createFolder(
  1. String folder
)

Implementation

static Future<bool> createFolder(String folder) async {
  final folderFeature = Directory(folder);
  final checkExist = await folderFeature.exists();
  if (checkExist) {
    printLog('[Error] Folder $folder is exist!');
    return false;
  }

  final create = await folderFeature.create();
  return create.path.isNotEmpty;
}