delete static method

Future<void> delete({
  1. required Folder folder,
  2. required String fileName,
})

Delete the file.

folder is the folder to delete the file from.

fileName is the name of the file.

Implementation

static Future<void> delete({
  required Folder folder,
  required String fileName,
}) async {
  File file = await _initFile(
    folder: folder,
    fileName: fileName,
  );

  if (file.existsSync()) {
    file.deleteSync();
  }
}