Function tauri_sys::fs::write_text_file

source ·
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.