fileSystem.exists
Whether anything, a file or a directory, is at a file:// URI.
Verwendung
Use an offline document only if its file is still present.
// 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
(uri: string): Promise<boolean>Parameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
uri | string | Ja | — |
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.