Inherits from: RHObject

Wraps and normalizes the zip and download feature.


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

// Add the document with DataID 190844

// 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 paths propertymethods serialize string zipdirectory zipfile

# 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

# paths

function Assoc paths()

# 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.

# zipdirectory

function String zipdirectory()

# zipfile

function String zipfile()

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