next up previous contents
Next: Properties Up: FFish Script Objects Reference Previous: saveToFile   Contents

FileStream(Stream) Object

Description

Facilitates sequential access to file.

available: SWFKit, SWFKit Pro


Syntax

new FileStream([filename[, mode]]);

Parameter

filename
Optional. String. Specifies the full path and name of the file.
mode
Optional. String. Type of access permitted. Default "r+"

Values Description
"r" Opens for reading. If the file does not exist or cannot be found, returns null.
"w" Opens an empty file for writing. If the given file exists, its contents are destroyed.
"a" Opens for writing at the end of the file (appending) without removing the EOF marker before writing new data to the file; creates the file first if it doesn't exist.
"r+" Opens for both reading and writing. (The file must exist.)
"w+" Opens an empty file for both reading and writing. If the given file exists, its contents are destroyed.
"a+" Opens for reading and appending; the appending operation includes the removal of the EOF marker before new data is written to the file and the EOF marker is restored after writing is complete; creates the file first if it doesnĄ¯t exist. If neither of the parameters is specified, the method creates a temporary file for both reading and writing. After a calling of the close method, the temporary file is automatically deleted. The files are always opened in binary mode.


Returns

Returns a new instance of the FileStream object. If failed, returns null. properties




Subsections
next up previous contents
Next: Properties Up: FFish Script Objects Reference Previous: saveToFile   Contents
Copyright ©2000-2007 Shanghai TopCMM Software Technologies. All Rights Reserved.