Inheritance diagram for DzGZFile:

Enumerations | |
| enum | AccessMode { ReadOnly, WriteOnly, ReadWrite, Append, Truncate, Translate } |
Methods | |
| void | close () |
| Boolean | eof () |
| Boolean | open (Number accessMode) |
| String | read () |
| Number | readByte () |
| String | readLine () |
| Array | readLines () |
| Boolean | unzip (String filename) |
| void | write (String data, Number length=-1) |
| void | writeByte (Number byte) |
| void | writeLine (String data) |
| Boolean | zip (String filename) |
Constructors | |
| DzGZFile (String file) | |
This class provides DAZ Script functionality for reading and writing *.gz ('gzipped') files. A high-level interface for zipping/unzipping files is provided with the functions zip() and unzip(). Also, a low-level interface is provided, allowing scripts to read and write compressed files directly.
| enum DzGZFile::AccessMode |
File access mode flags
| DzGZFile::DzGZFile | ( | String | file | ) |
Create a file with the given file name
| void DzGZFile::close | ( | ) |
Close the file
| Boolean DzGZFile::eof | ( | ) |
Open the file with the given mode.
| QString DzGZFile::read | ( | ) |
Read the entire file.
| int DzGZFile::readByte | ( | ) |
Read one uncompressed character from the file buffer.
| QString DzGZFile::readLine | ( | ) |
Read an uncompressed line of text from the file.
| QStringList DzGZFile::readLines | ( | ) |
Uncompress the entire file and split it into lines of text.
Write a string to the file compression buffer.
| data | The string to write to the file. | |
| length | The maximum number of characters to write to the file. If this is less than 1, the whole string is written. |
| void DzGZFile::writeByte | ( | Number | byte | ) |
Write a single byte (character) to the file compression buffer.
| byte | The character to write to the file. |
| void DzGZFile::writeLine | ( | String | data | ) |
Write a line of text to the file compression buffer.
| data | The string to write to the file - a new line character will be written immediately following the string contents. |
Replaces this file's contents with the zipped up contents of the given file. If this file does not exist, it will be created.