readAsBytes method

Future<Uint8List> readAsBytes(
  1. File file
)

Reads all bytes from file with controlled concurrency.

Works like File.readAsBytes, but enforces the semaphore limit to avoid file handle exhaustion or disk saturation under parallel load.

Implementation

Future<Uint8List> readAsBytes(File file) => _run(() => file.readAsBytes());