pub async fn write_text_file(
path: &Path,
contents: &str,
dir: BaseDirectory,
) -> Result<(), Error>
Expand description
Writes a UTF-8 text file.
ยงExample
use tauri_sys::fs;
fs::write_text_file(path, contents, BaseDirectory::Download).expect("could not writes binary file");
Requires allowlist > fs > writeTextFile
to be enabled.