[id] = zip.OpenArchive(id, filename$[, mode])
filename$
and
assigns id
to it. If you pass Nil
in id
, zip.OpenArchive()
will automatically
choose a vacant identifier and return it. If the file does not exist, this
function will fail unless you use the mode argument to open a zip archive for
writing. In that case, zip.OpenArchive()
will create the file for you.
The following modes are currently supported:
#MODE_READ:
#MODE_READWRITE:
#MODE_WRITE:
Although zip.hwp will automatically close all open zip archives when it quits, it is strongly advised that you close an open zip archive when you are done with it using the zip.CloseArchive() function because otherwise you are wasting resources and in case you are writing or modifying a zip archive, zip.CloseArchive() is where the actual work is done.
Note that zip.OpenArchive()
will create a standard Hollywood object which can
also be used with functions from Hollywood's object library such as GetAttribute()
,
SetObjectData()
, GetObjectData()
, etc. See zip.GetObjectType for details.
Nil
for auto id selection#MODE_READ
, #MODE_WRITE
or
#MODE_READWRITE
(defaults to #MODE_READ
)Nil
as argument 1 (see above)