fileSystem.exists
Whether anything, a file or a directory, is at a file:// URI.
Usage
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');Signatures
(uri: string): Promise<boolean>Parameters
| Name | Type | Required | Description |
|---|---|---|---|
uri | string | Yes | — |
Returns
Promise<boolean>
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.