read_to_string

Function read_to_string 

Source
pub fn read_to_string<P: AsRef<Path>>(path: P) -> CoreResult<String>
Expand description

Reads an entire file into a string

§Arguments

  • path - Path to the file

§Returns

  • Ok(String) if the file was read successfully
  • Err(CoreError::IoError) if the file could not be read

§Errors

Returns CoreError::IoError if the file could not be read.