ReadonlycanRandom-access: file ranges are read by absolute byte offset.
ReadonlysizeFile size captured at construction time.
Return a new file-backed source covering the specified byte range.
The zero-based byte offset to begin the slice.
The exclusive byte offset where the slice ends.
A new ContentSource representing the requested sub-range.
Open this file as a Web ReadableStream.
A ReadableStream that reads the file lazily.
Read this file into an ArrayBuffer.
Optional abort signal used while reading.
A promise resolving with the file bytes.
StaticfromCreate a FileSource using asynchronous filesystem validation.
Local filesystem path or file URL.
A FileSource bound to the validated file identity.
ContentSource backed by a local filesystem path.
FileSourceis Node-only but safe to import in browser builds: it touches Node filesystem APIs only when constructed or read. The constructor performs synchronous filesystem validation sosizeis immediately available; request handlers, sync loops, and other latency-sensitive code should use FileSource.fromPath. Both paths capture a best-effort regular file identity and reject a symlink as the final path component; parent directory symlinks are followed by the operating system, so callers that constrain paths under a trusted root should validate those parents separately. Reads reject if the path is replaced, if the filesystem cannot report stable identity on POSIX platforms, or if size/mtime/ctime changes before the configured byte range is read. On Windows, reads avoid unreliable dev/inode identity comparisons and validate size/mtime instead. Slices preserve the captured identity, so multipart uploads can read disjoint ranges without materialising the whole file in memory or following later leaf path swaps.