Function read_file

Source
pub fn read_file(file_path: &str) -> Result<String, Error>
Expand description

Reads the contents of a file into a String.

§Arguments

  • file_path - The path of the file to read.

§Returns

Returns a Result containing the file contents as a string on success, or an error message on failure.