readTextFile
readTextFile(
path,options?):Promise<string>
Defined in: plugins/fs/guest-js/index.ts:765
Reads and returns the entire contents of a file as UTF-8 string.
string | URL
Promise<string>
import { readTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';const contents = await readTextFile('app.conf', { baseDir: BaseDirectory.AppConfig });2.0.0
© 2025 Tauri Contributors. CC-BY / MIT