createFile method

File createFile({
  1. bool recursive = false,
})

Synchronously create the file. See also File.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

File createFile({bool recursive = false}) {
  var file = asFile;
  file.createSync(recursive: recursive);
  return file;
}