Gives an existing file a new name, possibly moving it to a new directory.
Return Value:
No return value.
Parameter Description
curstgfilename The file to rename.
newstgfilename The new name of the file.
Exceptions:
IOException if one of the following is true:
Either one or the other filename is not valid.
The source file cannot be found.
The source filename is a directory and the destination is a file.
The source filename is a file and the destination is a directory.