ensureDir method

void ensureDir(
  1. String path
)

Creates path's parent directory if needed (no-op in dry-run).

Implementation

void ensureDir(String path) {
  if (dryRun) return;
  Directory(path).createSync(recursive: true);
}