trash method

  1. @override
Future<bool> trash(
  1. Uri uri
)
override

Deletes uri by moving it to the platform's trash. Answers false when there is no trash to move it to — the caller then asks before delete: nothing is unlinked without a way back unless somebody said so.

Implementation

@override
Future<bool> trash(Uri uri) async {
  final local = localPathOf(uri);
  final moved = await _trash(local);
  if (moved) emitChange(uri, TomFileChangeType.deleted);
  return moved;
}