Skip to main content

download_data

Function download_data 

Source
pub fn download_data(data: &[u8], filename: &str) -> i32
Expand description

Save arbitrary bytes as a file in the host Downloads directory.

Returns 0 on success, -1 on failure (empty data or filename).