writeFile
writeFile(
path,data,options?):Promise<void>
Defined in: plugins/fs/guest-js/index.ts:1067
Write data to the given path, by default creating a new file if needed, else overwriting.
string | URL
Uint8Array<ArrayBufferLike> | ReadableStream<Uint8Array<ArrayBufferLike>>
Promise<void>
import { writeFile, BaseDirectory } from '@tauri-apps/plugin-fs';
let encoder = new TextEncoder();let data = encoder.encode("Hello World");await writeFile('file.txt', data, { baseDir: BaseDirectory.AppLocalData });2.0.0
© 2025 Tauri Contributors. CC-BY / MIT