writeFolder function

void writeFolder(
  1. String path
)

make a folder

Implementation

void writeFolder(String path) {
  final newFolder = Directory(path);
  final alreadyExists = newFolder.existsSync();

  if (alreadyExists) {
    return;
  }

  // 親ディレクトリも作成
  newFolder.createSync(recursive: true);
}