Verwendung

Use an offline document only if its file is still present.

tsx
// Use an offline document only if its file is still present.
import { fileSystem } from 'kuito';

const uri = fileSystem.cache + 'article.txt';
const article = (await fileSystem.exists(uri)) ? await fileSystem.read(uri) : null;
console.log(article ?? 'Download the article first');

Signaturen

ts
(uri: string): Promise<boolean>

Parameter

NameTypErforderlichBeschreibung
uristringJa—

Rückgabe

Promise<boolean>

Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.