File class
83
Description
Property (read-only); a string specifying the type of data or encoding used when a file is
opened. The following strings are supported:
"text"
,
"utf8"
, and
"binary"
. The property is
undefined for directories and closed files. If the file is opened in “text” mode and UTF-8
BOM (Byte Order Mark) is detected, the
type
property is set to
"utf8"
.
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()