
68
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Returns
If the operation is successful, returns the current position in the file; otherwise, returns -1. If the file is closed, the
operation fails and calls
application.onStatus() to report a warning. The operation returns -1 when called on a
directory.
File.toString()
fileObject.toString()
Returns the path to the File object.
Availability
Flash Media Server 2
Returns
A string.
Example
The following example outputs the path of the File object myFileObject:
trace(myFileObject.toString());
File.type
fileObject.type
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". This 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".
Availability
Flash Media Server 2.0
See also
File.open()
File.write()
fileObject.write(param0, param1,...paramN)
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.
When this method fails, it invokes the application.onStatus() event handler to report errors.
Note: The user or process owner that the server runs under in the operating system must have write permissions or this
call can fail.
Availability
Flash Media Server 2
Parameters
param0, param1,...paramN Parameters to write to the file.
Kommentare zu diesen Handbüchern