delete static method

Future<bool> delete(
  1. String fileName, {
  2. bool? recursive,
})

Deletes the 'local' file

Implementation

static Future<bool> delete(String fileName, {bool? recursive}) async {
  bool delete = fileName.isNotEmpty;
  if (!delete) {
    return delete;
  }
  final file = await get(fileName);
  try {
    await file.delete(recursive: recursive ?? false);
    delete = true;
  } catch (e) {
    delete = false;
  }
  return delete;
}