Skip to main content

to_map16

Function to_map16 

Source
pub fn to_map16<I: AsRef<Path>, O: AsRef<Path>>(
    input_folder: I,
    output_file: O,
) -> Result<()>
Expand description

Converts from a folder tree of human-readable text files, generally generated by from_map16, back to a binary map16 file.

§Examples

use human_readable_map16::to_map16;
 
to_map16("map16_folder", "output.map16");

§Panics

This function does not panic.

§Errors

Returns an error if any step of the conversion fails. This could be for many reasons, the map16 folder not existing, formatting errors in the input text files, problems writing the output file, etc.

Error::Conversion should contain a fairly descriptive message if it is returned. Other errors should rarely occur.