Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Window Wrinum X.509 Xmldom Xml_ent Zip
Libraries
Zip Source Code
 previous   up   next 

Types
zipArchive
FileSys implementation type to access ZIP and JAR archives.

zipArchive

const type: zipArchive

FileSys implementation type to access ZIP and JAR archives. The zip file system does not support the concept of a current working directory. The functions chdir and getcwd are not supported by the zip file system. The root path of a zip file system is "".


Function Summary
fileSys
openZip (inout file: zipFile)
Open a ZIP archive with the given zipFile.
fileSys
openZip (in string: zipFileName)
Open a ZIP archive with the given zipFileName.
void
close (inout zipArchive: zip)
Close a ZIP archive.
array string
readDir (inout zipArchive: zip, in var string: dirPath)
Determine the file names in a directory inside a ZIP archive.
array string
readDir (inout zipArchive: zip, RECURSIVE)
Determine the file paths in a ZIP archive.
fileType
fileType (inout zipArchive: zip, in string: filePath)
Determine the type of a file in a ZIP archive.
fileType
fileTypeSL (inout zipArchive: zip, in string: filePath)
Determine the type of a file in a ZIP archive.
fileMode
fileMode (inout zipArchive: zip, in string: filePath)
Determine the file mode (permissions) of a file in a ZIP archive.
integer
fileSize (inout zipArchive: zip, in string: filePath)
Determine the size of a file in a ZIP archive.
time
getMTime (inout zipArchive: zip, in string: filePath)
Determine the modification time of a file in a ZIP archive.
string
getFile (inout zipArchive: zip, in string: filePath)
Get the contents of a file in a ZIP archive.
void
for (inout string: filePath) range (inout zipArchive: zip) do (in proc: statements) end for
For-loop which loops recursively over the paths in a ZIP archive.

Function Detail

openZip

const func fileSys: openZip (inout file: zipFile)

Open a ZIP archive with the given zipFile.

Parameters:
zipFile - File that contains a ZIP archive.
Returns:
a file system that accesses the ZIP archive.

openZip

const func fileSys: openZip (in string: zipFileName)

Open a ZIP archive with the given zipFileName.

Parameters:
zipFileName - Name of the ZIP archive to be opened.
Returns:
a file system that accesses the ZIP archive.

close

const proc: close (inout zipArchive: zip)

Close a ZIP archive.


readDir

const func array string: readDir (inout zipArchive: zip, in var string: dirPath)

Determine the file names in a directory inside a ZIP archive. Note that the function returns only the file names. Additional information must be obtained with other calls.

Parameters:
zip - Open ZIP archive.
dirPath - path of a directory in the ZIP archive.
Returns:
an array with the file names.
Raises:
RANGE_ERROR - dirPath does not use the standard path representation.
FILE_ERROR - dirPath is not present in the ZIP archive.

readDir

const func array string: readDir (inout zipArchive: zip, RECURSIVE)

Determine the file paths in a ZIP archive. Note that the function returns only the file paths. Additional information must be obtained with other calls.

Parameters:
zip - Open ZIP archive.
Returns:
an array with the file paths.

fileType

const func fileType: fileType (inout zipArchive: zip, in string: filePath)

Determine the type of a file in a ZIP archive. A return value of FILE_ABSENT does not imply that a file with this name can be created, since missing directories and illegal file names cause also FILE_ABSENT.

Returns:
the type of the file.
Raises:
RANGE_ERROR - filePath does not use the standard path representation.

fileTypeSL

const func fileType: fileTypeSL (inout zipArchive: zip, in string: filePath)

Determine the type of a file in a ZIP archive. A return value of FILE_ABSENT does not imply that a file with this name can be created, since missing directories and illegal file names cause also FILE_ABSENT.

Returns:
the type of the file.
Raises:
RANGE_ERROR - filePath does not use the standard path representation.

fileMode

const func fileMode: fileMode (inout zipArchive: zip, in string: filePath)

Determine the file mode (permissions) of a file in a ZIP archive.

Returns:
the file mode.
Raises:
RANGE_ERROR - filePath does not use the standard path representation.
FILE_ERROR - filePath is not present in the ZIP archive.

fileSize

const func integer: fileSize (inout zipArchive: zip, in string: filePath)

Determine the size of a file in a ZIP archive. The file size is measured in bytes. For directories a size of 0 is returned.

Returns:
the size of the file.
Raises:
RANGE_ERROR - filePath does not use the standard path representation.
FILE_ERROR - filePath is not present in the ZIP archive.

getMTime

const func time: getMTime (inout zipArchive: zip, in string: filePath)

Determine the modification time of a file in a ZIP archive.

Returns:
the modification time of the file.
Raises:
RANGE_ERROR - filePath does not use the standard path representation.
FILE_ERROR - filePath is not present in the ZIP archive.

getFile

const func string: getFile (inout zipArchive: zip, in string: filePath)

Get the contents of a file in a ZIP archive.

Returns:
the specified file as string.
Raises:
RANGE_ERROR - filePath does not use the standard path representation.
FILE_ERROR - filePath is not present in the ZIP archive, or the crc-32 checksum is not okay.

for

const proc: for (inout string: filePath) range (inout zipArchive: zip) do (in proc: statements) end for

For-loop which loops recursively over the paths in a ZIP archive.



 previous   up   next