# ZIP

Inherits from: RHObject


Wraps and normalizes the zip and download feature.

Example:

// Create a ZIP instance
Frame zipCreator = $RHCore.ZIP.New( prgCtx, 'myZipFile')

// Add the document with an RHNode or RHNodeVersion
zipCreator.add(node)

// ZIP the contents
Assoc results = zipCreator.zip()

// output the download link
echo( results.link )

# Class Methods

# Inherited methods

Destructor ErrorAssoc OKAssoc

# New

function Dynamic New(Object prgCtx, String filename)

Construct an instance of ZIP.

# Overrides:

New in class RHObject

# Parameters
  • prgCtx - The program context.

  • filename - The filename that will be generated after zipping. The .zip suffix will be appended.

# Returns
  • A Frame instance of ZIP.

# Instance Methods

# Property Methods

Property methods can be accessed with the valueForKey method.

classidentifier classname clone errorassoc hash identityhashcode iterator methods okassoc propertymethods reset serialize string tempdirectory zipfile zipfiledirectory

# Inherited methods

assert cacheMethod cacheValueForKey callSuper checkError class classIdentifier className clone deserialize dict endTrans hash identityHashCode isAccessorMethod isCached isInstanceOf isProperty isPropertyMethod iterator methods pluck prepareForReuse propertyMethods removeFromCache reset resetCache resetSubclass respondsTo serialize setCacheValueForKey setValueForKey setValueForKeyPath setValues startTrans string super valueForKey valueForKeyPath

# add

function Assoc add(Frame item)

Add a document to the ZIP file.

# Parameters
  • node - The RHNode or RHNodeVersion

# setZipFileDirectory

function Frame setZipFileDirectory(Dynamic zipFileDirectory)

# tempDirectory

function String tempDirectory()

# zip

function Assoc zip(Record request=$RHCore.Utils.GetRequest(.fPrgCtx))

ZIP the content.

# Returns
  • An Assoc containing the status of the ZIP operation. The link key contains a single-use download link.

# zipfile

function String zipfile()

# zipFileDirectory

function Dynamic zipFileDirectory()

Last Updated: 3/28/2019, 2:48:37 PM