createFile function

Future<File> createFile(
  1. File file, {
  2. CreateOptions? options,
})

Create a file recursively

Implementation

Future<File> createFile(File file, {CreateOptions? options}) async {
  options ??= defaultCreateOptions;
  if (options.delete) {
    await deleteFile(file);
  }
  await file.create(recursive: options.recursive);
  return file;
}