writeTextFile
writeTextFile(
path
,data
,options?
):Promise
<void
>
Defined in: plugins/fs/guest-js/index.ts:1111
Writes UTF-8 string data
to the given path
, by default creating a new file if needed, else overwriting.
string
| URL
string
Promise
<void
>
import { writeTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
await writeTextFile('file.txt', "Hello world", { baseDir: BaseDirectory.AppLocalData });
2.0.0
© 2025 Tauri Contributors. CC-BY / MIT