altdss.ZIP#

Module Contents#

Classes#

IZIP

API#

class altdss.ZIP.IZIP(api_util, prefer_lists=False)#

Bases: altdss.common.Base

Close()#

Closes the current open ZIP file

(API Extension)

Contains(Name: AnyStr) bool#

Check if the given path name is present in the current ZIP file.

(API Extension)

Extract(FileName: AnyStr) bytes#

Extracts the contents of the file “FileName” from the current (open) ZIP file. Returns a byte-string.

(API Extension)

List(regexp: Optional[AnyStr] = None) List[str]#

List of strings consisting of all names match the regular expression provided in regexp. If no expression is provided, all names in the current open ZIP are returned.

See https://regex.sorokin.engineer/en/latest/regular_expressions.html for information on the expression syntax and options.

(API Extension)

Open(FileName: AnyStr)#

Opens and prepares a ZIP file to be used by the DSS text parser. Currently, the ZIP format support is limited by what is provided in the Free Pascal distribution. Besides that, the full filenames inside the ZIP must be shorter than 256 characters. The limitations should be removed in a future revision.

(API Extension)

Redirect(FileInZip: AnyStr)#

Runs a “Redirect” command inside the current (open) ZIP file. In the current implementation, all files required by the script must be present inside the ZIP, using relative paths. The only exceptions are memory-mapped files.

(API Extension)

__contains__(Name) bool#
__getitem__(FileName) bytes#
__init__(api_util, prefer_lists=False)#