[**@lancedb/lancedb**](../README.md) • **Docs** *** [@lancedb/lancedb](../globals.md) / BlobFile # Class: BlobFile A lazy handle to blob bytes. Create one with [Table.fetchBlobFiles](Table.md#fetchblobfiles). ## Methods ### close() ```ts close(): Promise ``` Releases the handle. Reads after `close()` fail. Calling it again does nothing. #### Returns `Promise`<`void`> *** ### isClosed() ```ts isClosed(): boolean ``` Returns true after [BlobFile.close](BlobFile.md#close). #### Returns `boolean` *** ### read() ```ts read(maxBytes?): Promise ``` Reads from the cursor and advances the cursor. Reads to the end when `maxBytes` is omitted, or at most `maxBytes` bytes otherwise. Returns an empty buffer at the end of the blob. [BlobFile.readRange](BlobFile.md#readrange) does not move the cursor. #### Parameters * **maxBytes?**: `bigint` #### Returns `Promise`<`Buffer`> *** ### readRange() ```ts readRange(start, end): Promise ``` Reads the half-open byte range `[start, end)`. Fails when `end` is past the blob size. Does not move the cursor. #### Parameters * **start**: `bigint` * **end**: `bigint` #### Returns `Promise`<`Buffer`> *** ### readRanges() ```ts readRanges(ranges): Promise ``` Reads several half-open byte ranges. Returns one buffer per range, in the order given. Fails when any `end` is past the blob size. Does not move the cursor. #### Parameters * **ranges**: [`BlobRange`](../type-aliases/BlobRange.md)[] #### Returns `Promise`<`Buffer`[]> *** ### seek() ```ts seek(position): Promise ``` Moves the cursor to `position`, in bytes from the start of the blob. #### Parameters * **position**: `bigint` #### Returns `Promise`<`void`> *** ### size() ```ts size(): bigint ``` Returns the blob size in bytes. #### Returns `bigint` *** ### tell() ```ts tell(): Promise ``` Returns the cursor position in bytes. #### Returns `Promise`<`bigint`>