Verwendung

Decode a UTF-8 file returned as bytes.

Dieser Typ wird verwendet von fileSystem.readBytes

tsx
// 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

ts
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

NameTypErforderlichBeschreibung
positionnumberNeinThe first byte to read. Defaults to 0.
lengthnumberNeinHow 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.