Create a new local filesystem connector.
Optionaloptions: LocalConnectorOptions
Optional configuration. See LocalConnectorOptions.
ReadonlycachePaths name files on this machine, relative ones from the working directory.
ReadonlyhintsLocal reads are cheap: merge only near-adjacent ranges, read a modest prefix.
Close all pooled file handles and clear the LRU pool.
Idle handles are closed immediately; handles still in use by in-flight
reads are closed as soon as those reads finish. A later read reopens
its file, so calling close() repeatedly is safe.
Resolves when every idle handle has been closed.
Read a contiguous byte range from a local file.
The file handle is obtained from the LRU pool (or opened on first
access). The returned Uint8Array may be shorter than length if
the file is smaller than offset + length.
With ReadOptions.ifMatch, the version tag (inode, size and
modification time) is checked first, both of the file the read goes
through and of the file now at path.
Absolute or relative filesystem path to the FGB file.
Zero-based byte offset to begin reading from.
Number of bytes to read.
Optionaloptions: ReadOptions
Optional version check and abort signal.
The requested byte range.
Read the first length bytes of a file together with its size and
version tag (inode, size and modification time).
If the file at path was replaced since its handle was pooled, the
stale handle is dropped first, so bytes and metadata always describe
the same file.
Absolute or relative filesystem path to the FGB file.
Number of leading bytes to read.
Optionaloptions: ReadOptions
Optional abort signal.
The leading bytes plus size and version tag.
Read multiple byte ranges from the same local file in parallel.
All ranges are dispatched concurrently via Promise.all, letting the
OS I/O scheduler optimize disk access order.
Absolute or relative filesystem path to the FGB file.
Array of { offset, length } byte-range descriptors.
Optionaloptions: ReadOptions
Optional version check (performed once) and abort signal.
Array of Uint8Array chunks in the same order as the input ranges.
Local filesystem connector using Node.js
FileHandlewith LRU pooling.Opens FGB files on demand and caches the resulting
FileHandlein an LRU map. Subsequent reads against the same path reuse the cached handle, avoiding repeatedopen()syscalls; concurrent first reads of a path share a singleopen(). When the pool exceeds LocalConnectorOptions.maxOpenFiles, least-recently-used handles that no read is using are evicted and closed. Handles in use are never closed underneath a read, so the limit is soft while every handle is busy.Example