Utilização

Decode a UTF-8 file returned as bytes.

Este tipo é usado por 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);

Declaração do tipo

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;
};

Membros 2

NomeTipoObrigatórioDescrição
positionnumberNãoThe first byte to read. Defaults to 0.
lengthnumberNãoHow many bytes to read. Defaults to the rest of the file.
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.