delete method
Delete the file at a given path.
Implementation
@override
Future<bool> delete(dynamic paths) {
return _write(() async {
final keys = switch (paths) {
String value => <String>[_objectKey(value)],
Iterable<String> values =>
values.map(_objectKey).toList(growable: false),
_ => throw ArgumentError.value(
paths,
'paths',
'Expected a String or Iterable<String>.',
),
};
if (keys.isEmpty) return true;
await _deleteKeys(keys);
return true;
});
}