#include <revolution/vf.h>
typedef s32 VFErr;
VFErr VFRenameFile( const char* old_name, const char* new_name );
VFErr VFRenameFileW( const VFWchar* old_name, const VFWchar* new_name );
VFErr VFRenameDir( const char* old_name, const char* new_name );
VFErr VFRenameDirW( const VFWchar* old_name, const VFWchar* new_name );
old_name |
File or directory name, with or without a path, that you want to change. |
new_name |
New file or directory name. |
Returns 0 when successful
Otherwise, returns VFErr other than 0
Changes a file or directory name.
It cannot move files or directories.
As a result, if the paths specified in old_name and new_name differ, an error will be returned.
When a path is not specified in old_name, a file in the current directory is targeted.
In addition, if only a file name or directory name is specified in new_name, the path is assumed to be the same as that specified in old_name.
Note: When the file or directory specified in old_name is open, or if its attributes are read-only (VF_ATTR_RDONLY), the name cannot be changed.
2006/07/03
2007/05/08 Corrected errors.
CONFIDENTIAL