Sign in Join
FPDoc Onlineexperiment

TZipper.Zip procedure

Member of TZipperpublicIn unit Zipper

Convenience method used to create a .zip file with the given name containing the specified file(s).

Declaration

pascal
class procedure Zip(const AZipFileName: RawByteString; 
 const aFileToBeZipped: RawByteString)
class procedure Zip(const AZipFileName: RawByteString; 
 aFileList: Array of RawByteString)
class procedure Zip(const AZipFileName: RawByteString; 
 aFileList: TStrings)

Arguments

AZipFileName

Name for the .zip file created in the method.

aFileToBeZipped

Name of the file added to the .zip file.

aFileList

Contains file names added to the .zip file.

Description

Zip is a class procedure used to create a .zip file with the name specified in AZipFileName. Overloaded variants are provided that allow one or more file names to be specified using the AFileToBeZipped or AFileList arguments.

For example:

var
  SZip, SFile: RawByteString;

  SZip := '/usr/tmp/docbook5-catalog.zip';
  SFile := '/usr/share/xml/docbook/schema/sch/5.0/catalog.xml'

  TZipper.Zip(SZip, SFile);
  

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.