DAZ Script | |
---|---|
void | close () |
Boolean | eof () |
Boolean | open ( AccessMode accessMode ) |
String | read () |
Number | readByte () |
ByteArray | readByteLine () |
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 ) |
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.
Enumerated values used with open() to describe the mode in which a file is opened.
'. When writing, the end-of-line terminators are translated to the local encoding.
Creates a gzip file with the given file name.
Parameter(s):
void : close()
Closes the file.
Return Value:
true
if the current file position is at the end of the file, otherwise false
.Boolean : open( AccessMode accessMode )
Open the file with the given mode.
Parameter(s):
Return Value:
true
if the file was opened successfully, otherwise false
.Reads the entire file.
Return Value:
Read one uncompressed character from the file buffer.
Return Value:
Read a line of text from the file.
Return Value:
Since:
Read an uncompressed line of text from the file.
Return Value:
Uncompresses the entire file and splits it into lines of text.
Return Value:
Boolean : unzip( String filename )
Unzips this file into the given filename.
Parameter(s):
true
if the file was successfully unzipped, otherwise false
.
void : write( String data, Number length=-1 )
Write a string to the file compression buffer.
Parameter(s):
void : writeByte( Number byte )
Write a single byte (character) to the file compression buffer.
Parameter(s):
void : writeLine( String data )
Write a line of text to the file compression buffer.
Parameter(s):
Boolean : zip( String filename )
Replaces this file's contents with the gzipped contents of the given file. If this file does not exist, it will be created.
Parameter(s):
Return Value:
true
if the file was successfully zipped, otherwise false
.