pub fn read_to_file<R: Read, P: AsRef<Path>>( source: &mut R, target: P, ) -> Result<File, FileError>
Reads all of the data from source and writes it into a new file at target.