open static method

Future<FileBlock> open(
  1. File file, {
  2. String type = '',
})

Opens an entire file as a lazy, file-backed Block.

Implementation

static Future<FileBlock> open(File file, {String type = ''}) async {
  final totalSize = await file.length();
  return _openWithKnownSize(
    file,
    totalSize: totalSize,
    offset: 0,
    length: totalSize,
    type: type,
  );
}