File.renameTo

File.renameTo

Class Overview | Class Members | This Package | All Packages

Syntax
public boolean renameTo( File dest )
Parameters
dest
the new filename.
Returns
true if the renaming succeeds; false otherwise.
Description
Renames the file specified by this File object to have the pathname given by the File argument.

Exceptions
SecurityException if a security manager exists, its checkWrite method is called both with the pathname of this file object and with the pathname of the destination target object to see if the application is allowed to write to both files.
See Also
getPath, checkWrite