
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
55
Availability
Flash Media Server 2
Returns
A string.
File.remove()
fileObject.remove(recursive)
Removes the file or directory pointed to by the File object. When this method fails, it invokes the appli-
cation.onStatus()
event handler to report errors.
Availability
Flash Media Server 2
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)
Commenti su questo manuale