MCPcopy
hub / github.com/vercel-labs/just-bash / readFileBytes

Method readFileBytes

packages/just-bash/src/fs/interface.ts:149–149  ·  view source on GitHub ↗

* Read the raw bytes of a file as a ByteString (latin1-shaped: each * char = one byte). Use when the bytes will be piped onward unchanged or * explicitly decoded with `decodeBytesToUtf8` — never call string methods * on the result, that's the bug class this type prevents. * *

(path: string)

Source from the content-addressed store, hash-verified

147 * @throws Error if file doesn't exist or is a directory
148 */
149 readFileBytes?(path: string): Promise<ByteString>;
150
151 /**
152 * Read the contents of a file as a Uint8Array (binary)

Callers 1

readBytesFromFunction · 0.65

Implementers 4

ReadWriteFspackages/just-bash/src/fs/read-write-f
OverlayFspackages/just-bash/src/fs/overlay-fs/o
InMemoryFspackages/just-bash/src/fs/in-memory-fs
MountableFspackages/just-bash/src/fs/mountable-fs

Calls

no outgoing calls

Tested by

no test coverage detected