file_read

Function file_read 

Source
pub fn file_read(file_name: &str) -> Result<String, Box<dyn Error>>
Expand description

Reads the content of a file into a String.

§Arguments

  • file_name - The path to the file to read.

§Returns

A Result containing the content of the file as a String, or an error if the file could not be read.