Function tauri_wasm::plugin::fs::write_text_file
source · pub async fn write_text_file(
path: &Path,
contents: &str,
dir: BaseDirectory
) -> Result<()>
Expand description
Writes a UTF-8 text file.
§Example
use tauri_wasm::plugin::fs;
fs::write_text_file(path, contents, BaseDirectory::Download).expect("could not writes binary file");
Requires plugins > fs > writeTextFile
to be enabled.