onDeleted method

StreamSubscription<FileSystemEvent> onDeleted(
  1. void block()
)

Calls block whenever the this file is deleted. Returns StreamSubscription which allows to cancel the listener.

Implementation

StreamSubscription<FileSystemEvent> onDeleted(void Function() block) {
  return watch(events: FileSystemEvent.delete).listen((event) => block());
}