Function cgl_rs::utils::write_file

source ·
pub fn write_file(path: &str, data: &[u8], size: usize) -> bool
Expand description

Arguments

  • path - The path to the file to write data to.
  • data - A slice of bytes to write to the file.
  • size - The size of the data slice.

Example

let data = [1, 2, 3];
let success = cgl_rs::utils::write_file("log.txt", &data, 3);