Function cgl_rs::utils::read_file

source ·
pub fn read_file(path: &str) -> (usize, Vec<i8>)
Expand description

Reads the contents of a file and returns it as a vector of bytes.

Arguments

  • path - The path to the file to read.
  • size - A pointer to a size_t variable that will be set to the size of the file.

Example

let (size, contents) = cgl_rs::utils::read_file("log.txt");