Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter SixFile Functions (continued)

ZipOpen Function

Overview

The ZipOpen function opens an existing zip file and creates a Zip Object.

Syntax/Parameters

Syntax

handle = ZipOpen ( string name );

Parameters

name

A string containing a filename and path or URI. The file is locked until the Zip Object is closed.

Return Value

Returns a handle to the Zip Object or NULL_HANDLE on failure. Use the GetLastError function to retrieve error information.

File errors will be returned if the file cannot be accessed. An ERROR_SYNTAX with a syntax error code will be returned if there is a problem with the content of the zip file.

Remarks

The returned object handle is what is used to access the data within the Zip Object. On execution, the ZipOpen function indexes the file and creates a entry list for each compressed item. Depending on the generating software, entries may contain partial paths and folders may also appear in the list.

Many of today’s complex file formats are actually compressed representations of a series of XML and other files. For example, DOCX is actually a zip file of a series of XML files. Legato only supports a segment of zip functionality. Specifically, unencrypted 32-bit zip formats with store or deflate compression modes are supported.

Use the CloseHandle function to release the object.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic