fileSystem.ByteRange
Picks the part of a file fileSystem.readBytes reads, for reading a header or a large file in pieces.
Verwendung
Decode a UTF-8 file returned as bytes.
Dieser Typ wird verwendet von fileSystem.readBytes
// Decode a UTF-8 file returned as bytes.
import { fileSystem } from 'kuito';
const bytes = await fileSystem.readBytes(fileSystem.documents + 'notes.txt');
const text = new TextDecoder().decode(bytes);
console.log(text);Typdeklaration
export type ByteRange = {
/** The first byte to read. Defaults to 0. */
position?: number;
/** How many bytes to read. Defaults to the rest of the file. */
length?: number;
};Mitglieder 2
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
position | number | Nein | The first byte to read. Defaults to 0. |
length | number | Nein | How many bytes to read. Defaults to the rest of the file. |
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.