# UnzipSetBaseDir

Definition: | include builtins\LiteZip.e UnzipSetBaseDir(atom hzip, string basedir)
Description: | Sets the base directory for subsequent file extraction. hzip: the result of a successful call to UnzipOpenFile(). basedir: can be an absolute or relative directory path. Terminates in error on failure.
pwa/p2js: | Not supported
Example: | Copy
    include builtins\LiteZip.e

    atom hzip = UnzipOpenFile("phix.0.7.7.1.zip")

    UnzipSetBaseDir(hzip,"test")

    ZIPENTRY ze = new_ZIPENTRY()
    ?UnzipFindItem(hzip,ze,"readme.txt") -- prints 0 (ZR_OK)
    ?UnzipGetFileName(ze) -- prints `test\readme.txt`

    UnzipClose(hzip)
See Also: | UnzipOpenFile, ZIPENTRY, UnzipFindItem, UnzipGetFileName, UnzipClose