# ZipCreateFile

Definition: | include builtins\LiteZip.e object hzip = ZipCreateFile(string filename)
Description: | Opens a new zip archive. filename: the name of the archive to open Returns an atom handle or a string error message.
pwa/p2js: | Not supported.
Comments: | You may want to invoke delete_file() first. No serious attempt has been made to support opening an existing archive and adding more files to it, not even any testing: you may with some luck find that it just works. Call ZipClose(hzip) once you have finished processing the archive. You can of course declare hzip as an atom if fail fast is your thing, which it is mine - in other words, a fatal type check error, and the corresponding ex.err file, usually works out far better for me than something akin to `puts(1,"oops"); abort(0)` ever could. Likewise I tend to store any `ZR_OK (=0)|string error` results in an integer and rely on the typecheck from that.
Example: | Copy
    include builtins\LiteZip.e

    atom hzip = ZipCreateFile("test.zip")
    ...
    ZipClose(hzip)
See Also: | ZipClose