Skip to main content
AskMe (beta)
Loading icon

HS.Util.Zip.Adapter

class HS.Util.Zip.Adapter extends Ens.Adapter

Property Inventory

Method Inventory

Parameters

parameter SETTINGS = -ZipCommand,-UnZipCommand,WorkingDirectory;
Inherited description: List of properties can be set as settings in the configuration file format is a comma separated list of property names

Properties

property UnZipCommand as %String [ InitialExpression = $S($zv["Win":"""c:\program files\7-zip\7z"" x %1 -o. -r",1:"unzip %1 -d .") ];
Property methods: UnZipCommandDisplayToLogical(), UnZipCommandGet(), UnZipCommandIsValid(), UnZipCommandLogicalToDisplay(), UnZipCommandLogicalToOdbc(), UnZipCommandNormalize(), UnZipCommandSet()
property WorkingDirectory as %String [ InitialExpression = ##class(%File).NormalizeDirectory($$$TempDir_"Zip") ];
Property methods: WorkingDirectoryDisplayToLogical(), WorkingDirectoryGet(), WorkingDirectoryIsValid(), WorkingDirectoryLogicalToDisplay(), WorkingDirectoryLogicalToOdbc(), WorkingDirectoryNormalize(), WorkingDirectorySet()
property ZipCommand as %String [ InitialExpression = $S($zv["Win":"""c:\program files\7-zip\7z"" a %1 . -r",1:"zip -rm %1 .") ];
Property methods: ZipCommandDisplayToLogical(), ZipCommandGet(), ZipCommandIsValid(), ZipCommandLogicalToDisplay(), ZipCommandLogicalToOdbc(), ZipCommandNormalize(), ZipCommandSet()

Methods

classmethod GetFiles(pWorkingDirectory, pResponse As HS.Types.Zip, pBaseDirectory) as %Status
method UnZip(pRequest As HS.Message.ZipRequest, pResponse As HS.Message.ZipResponse) as %Status
Take a ZipRequest with a File and split it into items including the directory path.

The system command to unzip a file must be stored in the configuration registry, under "\ZipUtility\UnZipCommand". It must have "%1" in place of the path to the zip file and should unzip into the current directory.
Examples:
"c:\program files\7-zip\7z" x %1 -o. -r (Windows OS)
unzip %1 -d . (non-Windows OS)
method Zip(pRequest As HS.Message.ZipRequest, pResponse As HS.Message.ZipResponse) as %Status
The system command to zip a file must be stored in the configuration registry, under "\ZipUtility\ZipCommand". It must have "%1" in place of the path to the output zip file and should zip up the current directory.
Examples:
"c:\program files\7-zip\7z" a %1 . -r (Windows OS)
zip -rm %1 . (non-Windows OS)

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab