pub fn read_binary_file(
    filename: &Path,
    maxsize: Option<usize>
) -> (bool, String)
Expand description

Taken from https://gist.github.com/arvidsson/7231973

| Read full contents of a file and return | them in a std::string. | | Returns a pair <status, string>. | | If an error occurred, status will be | false, otherwise status will be true | and the data will be returned in string. | | ———– | @param maxsize | | Puts a maximum size limit on the file | that is read. If the file is larger than | this, truncated data (with len > maxsize) | will be returned. |