
67
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Parameters
recursive A boolean value specifying whether to do a recursive removal of the directory and all its contents (true),
or a nonrecursive removal of the directory contents (
false). If no value is specified, the default value is false. If
fileObject is not a directory, any parameters passed to the remove() method are ignored.
Returns
A boolean value indicating whether the file or directory was removed successfully (true) or not (false). Returns
false if the file is open, the path points to a root folder, or the directory is not empty.
Example
The following example shows the creation and removal of a file:
fileObject = new File("sharedobjects/_definst_/userIDs.fso");
fileObject.remove();
File.renameTo()
fileObject.renameTo(name)
Moves or renames a file. If the file is open or the directory points to the root directory, the operation fails. When this
method fails, it invokes the
application.onStatus() event handler to report errors.
Availability
Flash Media Server 2
Parameters
name The new name for the file or directory. The name can contain only UTF-8-encoded characters; high byte values
can be encoded by using the URI character-encoding scheme. The specified name is mapped to a system path by using
the mappings specified in the Application.xml file. If the path is invalid or the destination file doesn’t exist, the
operation fails.
Returns
A boolean value indicating whether the file was successfully renamed or moved (true) or not (false).
File.seek()
fileObject.seek(numBytes)
Skips a specified number of bytes and returns the new file position. This method can accept both positive and negative
parameters.
Availability
Flash Media Server 2
Parameters
numBytes A number indicating the number of bytes to move the file pointer from the current position.
Comentarios a estos manuales