readTextFile
Module @netwiv/api/plugins/fs · Kind Function
import { readTextFile } from '@netwiv/api/plugins/fs';Reads and returns the entire contents of a file as a string using the specified encoding (default: UTF-8).
Signature
Section titled “Signature”function readTextFile(path: string | URL, options?: ReadFileOptions | undefined): Promise<string>Example
Section titled “Example”import { readTextFile, BaseDirectory } from '@netwiv/api/plugins/fs';const contents = await readTextFile('app.conf', { baseDir: BaseDirectory.AppConfig });Upstream since 2.0.0
Descriptions come from the pinned @tauri-apps/plugin-fs@2.5.2 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.