deleteRef static method

void deleteRef(
  1. String path, {
  2. required String bucketName,
  3. required String ref,
})

Implementation

static void deleteRef(
  String path, {
  required String bucketName,
  required String ref,
}) {
  File file = File(path);
  if (file.existsSync()) {
    file.deleteSync();
    return;
  }
  Directory directory = Directory(path);
  if (directory.existsSync()) {
    directory.deleteSync(recursive: true);
    return;
  }
  throw RefNotFound(bucketName, ref);
}