shouldRun method

  1. @override
FutureOr<bool> shouldRun(
  1. TaskInvocation invocation
)
override

Check if the provided task invocation should run.

Returns true if it should, false otherwise.

Implementation

@override
FutureOr<bool> shouldRun(TaskInvocation invocation) async {
  await for (final file in deletions.resolveFiles()) {
    if (await file.exists()) return true;
  }
  return false;
}