Function latin::file::read [] [src]

pub fn read<P: AsRef<Path>>(path: P) -> IoResult<Vec<u8>>

Reads the file at path and returns the content as a Vec

If the file at path does not exist, an error is returned.

 let contents = latin::file::read("foo.txt");
 // or as a string
 let contents = latin::file::read("foo.txt").map(String::from_utf8);