Function: normalizeFileReadResultToArrayBuffer()
function normalizeFileReadResultToArrayBuffer(value: unknown): ArrayBuffer;
Defined in: main/ipc/fileReadPayload.ts:50
Normalizes a binary fs.readFile result into the exact ArrayBuffer that
should be returned to the renderer.
Node Buffers and Uint8Arrays often share a larger backing ArrayBuffer. Slicing by byteOffset/byteLength avoids leaking unrelated backing bytes across the IPC boundary.
Parametersβ
valueβ
unknown
Returnsβ
Throwsβ
Error when the file read result is not binary data or exceeds the FIT file cap.