createDirectory method

Directory createDirectory({
  1. bool recursive = false,
})

Synchronously create the directory. See also Directory.createSync.

If recursive is false, the default, the file is created only if all directories in the path exist. If recursive is true, all non-existing path components are created.

Implementation

Directory createDirectory({bool recursive = false}) {
  var directory = asDirectory;
  directory.createSync(recursive: recursive);
  return directory;
}