delete method
Deletes file under the current concurrency limit.
Useful when removing many files at once to avoid overwhelming the file system. Wraps File.delete.
Implementation
Future<void> delete(File file, {bool recursive = false}) async {
await _semaphore.acquire();
try {
await file.delete(recursive: recursive);
} finally {
_semaphore.release();
}
}