fileSystem.readBytes
The file's bytes, or length of them from position. They cross with no
encoding: the ArrayBuffer holds the bytes the platform read.
Verwendung
Decode a UTF-8 file returned as bytes.
// 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);Signaturen
(uri: string, range?: ByteRange): Promise<ArrayBuffer>Parameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
uri | string | Ja | — |
range | ByteRange | Nein | — Standard: {} |
Rückgabe
Promise<ArrayBuffer>
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.