Skip to main content

write_pack

Function write_pack 

Source
pub fn write_pack(world: &World, directory: &Path) -> Result<Written, Error>
Expand description

Compiles a world and writes it to directory/<sha256>.twpack, creating the directory if needed. The write is atomic and never replaces a different file.

§Errors

Returns an error if compilation or the write fails, or if a different file already has the pack’s name.