File.write()

Availability

Flash Media Server 2.

Usage

fileObject.write(param0, param1,...paramN)

Parameters

param0, param1,...paramN Parameters to write to the file.

Returns

A Boolean value indicating whether the write was successful (true) or not (false).

Description

Method; writes data to a file. The write() method converts each parameter to a string, and then writes it to the file without separators.

The file contents are buffered internally. The File.flush() method writes the buffer to the file on disk.

Example

The following example writes "Hello world" at the end of the myFileObject text file:

if (myFileObject.open( "text", "append") ) {
    myFileObject.write("Hello world");
} 

See also

File.writeAll(), File.writeByte(), File.writeln()