Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter SixFile Functions (continued)

ZipAddFile Function

Overview

The ZipAddFile function adds a file to the Zip Object.

Syntax/Parameters

Syntax

int = ZipAddFile ( handle hZip, string source, [string path] );

Parameters

hZip

A handle to a Zip Object.

source

A string containing a fully qualified source filename and path or URI. The name of the object is used as the entry filename for the item.

path

An optional string specifying a folder path. If omitted, the entry is place at the top of the file tree within the Zip Object.

Return Value

Returns an int as ERROR_NONE or a formatted error code on failure.

Remarks

The ZipAddFile function adds the file specified by the source parameter to the index of data that will be compressed when the Zip Object is written. The file must exist and be available for reading during the process. It is not locked and should be available when the ZipWrite function is executed.

Entry names are not checked for duplicate entries. Users should avoid duplicate names.

Files can be placed into folder organization by using the path parameter. If employed, it is up to the caller to insure the path contains only valid characters. Do not lead the path with a top root, many systems do not process this as the root (Windows ignores the entries). Path slashes can be forward or backward. Generally the unzipping client can use this organization to create a directly tree.

Related Functions

Platform Support

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

Legato IDE, Legato Basic