$k. ZipContainer#

Represents an archive and its directories

Methods#

addEntry(entity, filenameopt)#

Add entity to archive

Parameters:
NameTypeAttributesDescription
entity$k.Blob | $k.NetEntity

The new entry

filenamestring<optional>

The filename within the archive

Throws:

If the archive is already closed

Type
$k.exception.RuntimeError

addFolder(foldername) → {$k.ZipDirectory}#

Add folder to archive

Parameters:
NameTypeDescription
foldernamestring

Name of the subfolder

Returns:

The new folder

Type: 
$k.ZipDirectory

directories() → {Array.<$k.ZipDirectory>}#

Returns the directories

Version
  • Experimental feature, might be removed at any time
Returns:
Type: 
Array.<$k.ZipDirectory>

entry(filename) → {$k.NetEntity}#

Returns the entry at the given filename

Parameters:
NameTypeDescription
filenamestring

Filename of the entry

Version
  • Experimental feature, might be removed at any time
Returns:

The entry

Type: 
$k.NetEntity

filename() → {string}#

Returns the filename

Version
  • Experimental feature, might be removed at any time
Returns:
Type: 
string

filenames() → {Array.<string>}#

Returns the entry filenames

Version
  • Experimental feature, might be removed at any time
Returns:
Type: 
Array.<string>