VFMove{File, Dir}(W)

C Specification


#include <revolution/vf.h>

typedef s32	VFErr;

VFErr VFMoveFile( const char* src_name, const char* dst_name );
VFErr VFMoveFileW( const VFWchar* src_name, const VFWchar* dst_name );
VFErr VFMoveDir( const char* src_name, const char* dst_name );
VFErr VFMoveDirW( const VFWchar* src_name, const VFWchar* dst_name );

Arguments

src_name Name of the source file/directory to be moved (may include the path).
dst_name Name of the destination file/directory name (may include the path).

Return Values

When successful, 0.
When failed, a VFErr other than 0.

Description

Moves the specified file or directory. (Moves cannot be across different drives.) When a path is not specified in src_name, a file in the current directory is targeted. In addition, when only either a file name or a directory name is specified in dst_name, the current directory is similarly targeted. File names can be changed when moving them. In addition, even the file name specified in dst_name is not different from that used in src_name, the file and directory names must be specified in dst_name.
When a file or directory with the same file name as that of the directory specified in dst_name exists, an error results.
However, if the same path and file name or the same directory name is specified in dst_name and src_name, an error will not result.
When moving directories, if the directory specified in dst_name is the same as that specified in src_name, an error will result. For FAT12/16 media, when the root directory is specified in dst_name, an error will result if there is no space to allocate an entry region in the root directory. However, if the path specified in src_name is the root directory, and the required entry region for dst_name can be allocated by deleting the src_name entry, an error will not result. An error will result if a non-existent path is specified in dst_name. When the file and directory specified in src_name and a file within the directory for the path specified in dst_name have different long file names but the same short file names, the short file name for the file specified in src_name will be changed. Wildcards ('*' and '?') cannot be used to specify file names. If the file or directory specified in src_name is open, it cannot be moved.

See Also

Revision History

2006/07/03 Release.


CONFIDENTIAL