Visit Mozilla.org

XPInstall API Reference:File Object:Methods:rename

From MDC

Contents

[edit] rename

Renames a specified file in place.

[edit] Method of

File object

[edit] Syntax

int rename( FileSpecObject file, String newname )

[edit] Parameters

The rename method has the following parameters:

file
A FileSpecObject representing the file to be renamed.
newname
The new terminal (or leaf) name of the file.

[edit] Returns

An integer error code. For a list of possible values, see Return Codes.