1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<title>VFMove{File, Dir}(W)</title> 9</head> 10 11<body> 12 13<h1>VFMove{File, Dir}(W)</h1> 14 15<h2>C Specification</h2> 16<dl><dd><pre><code> 17#include <revolution/vf.h> 18 19typedef s32 VFErr; 20 21VFErr VFMoveFile( const char* src_name, const char* dst_name ); 22VFErr VFMoveFileW( const VFWchar* src_name, const VFWchar* dst_name ); 23VFErr VFMoveDir( const char* src_name, const char* dst_name ); 24VFErr VFMoveDirW( const VFWchar* src_name, const VFWchar* dst_name ); 25</code></pre></dd></dl> 26 27<h2>Arguments</h2> 28<p> 29<TABLE border="1" > 30 <tr> 31<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>src_name</EM></STRONG></CODE></TD> 32<TD width="520">Name of the source file/directory to be moved (may include the path).</TD> 33 </tr> 34 <tr> 35<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>dst_name</EM></STRONG></CODE></TD> 36<TD width="520">Name of the destination file/directory name (may include the path).</TD> 37 </tr> 38</TABLE> 39</p> 40 41<h2>Return Values</h2> 42<PRE> 43When successful, 0. 44When failed, a <code><a href="./VFErr.html">VFErr</a></code> other than 0. 45</PRE> 46 47 48<H2>Description</H2> 49<p> 50Moves the specified file or directory. (Moves cannot be across different drives.) When a path is not specified in <CODE><STRONG><EM>src_name</EM></STRONG></CODE>, a file in the current directory is targeted. In addition, when only either a file name or a directory name is specified in <CODE><STRONG><EM>dst_name</EM></STRONG></CODE>, the current directory is similarly targeted. File names can be changed when moving them. In addition, even the file name specified in <CODE><STRONG><EM>dst_name</EM></STRONG></CODE> is not different from that used in <CODE><STRONG><EM>src_name</EM></STRONG></CODE>, the file and directory names must be specified in <CODE><STRONG><EM>dst_name</EM></STRONG></CODE>.<br> When a file or directory with the same file name as that of the directory specified in <CODE><STRONG><EM>dst_name</EM></STRONG></CODE> exists, an error results.<br> However, if the same path and file name or the same directory name is specified in <CODE><STRONG><EM>dst_name</EM></STRONG></CODE> and <CODE><STRONG><EM>src_name</EM></STRONG></CODE>, an error will not result.<br> When moving directories, if the directory specified in <CODE><STRONG><EM>dst_name</EM></STRONG></CODE> is the same as that specified in <CODE><STRONG><EM>src_name</EM></STRONG></CODE>, an error will result. For FAT12/16 media, when the root directory is specified in <CODE><STRONG><EM>dst_name</EM></STRONG></CODE>, an error will result if there is no space to allocate an entry region in the root directory. However, if the path specified in <CODE><STRONG><EM>src_name</EM></STRONG></CODE> is the root directory, and the required entry region for <CODE><STRONG><EM>dst_name</EM></STRONG></CODE> can be allocated by deleting the <CODE><STRONG><EM>src_name</EM></STRONG></CODE> entry, an error will not result. An error will result if a non-existent path is specified in <STRONG><EM>dst_name</EM></STRONG></CODE>. When the file and directory specified in <STRONG><EM>src_name</EM></STRONG></CODE> and a file within the directory for the path specified in <STRONG><EM>dst_name</EM></STRONG></CODE> have different long file names but the same short file names, the short file name for the file specified in <STRONG><EM>src_name</EM></STRONG></CODE> will be changed. Wildcards ('<CODE>*</CODE>' and '<CODE>?</CODE>') cannot be used to specify file names. If the file or directory specified in <STRONG><EM>src_name</EM></STRONG></CODE> is open, it cannot be moved. 51 52 53</p> 54 55<h2>See Also</h2> 56<p> 57</p> 58 59<H2>Revision History</H2> 60<p>2006/07/03 Release.</p> 61 62 63<hr><p>CONFIDENTIAL</p></body> 64</html> 65