Parameters
The new name for the file or directory. The name can contain only UTF-8 encoded
name
characters; high byte values can be encoded using the URI character-encoding scheme. The
specified name is mapped to a system path using the mappings specified in the
Application.xml file. If the path is invalid or the destination file doesn't exist, the operation
will fail.
Returns
A Boolean value indicating whether the file was renamed or moved successfully (
) or not
true
(
).
false
Description
Method; moves or renames a file. The operation fails if the file is open or the directory points
to the root directory.
Example
The following code lets you execute code when
is renamed:
myFileObject
if (myFileObject.renameTo( "/logs/hello.log.old")){
// Do something here.
}
File.seek()
Availability
Flash Media Server 2.
Usage
fileObject.seek(numBytes)
Parameters
An integer indicating the number of bytes to move the file pointer from the
numBytes
current position.
Returns
If the operation is successful, returns the current position in file; otherwise, returns -1. If the
file is closed, the operation fails and reports a warning. The operation returns
if it's
undefined
called on a directory.
File class
81
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?