- Fast seek feature is also applied to f_read() and f_write(). - f_lseek() reports required table size on creating CLMP. - Extended format syntax of f_printf function. - Ignores duplicated directory separators in given path names.
83 lines
2.6 KiB
HTML
83 lines
2.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html lang="ja">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
|
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
|
<link rel="up" title="FatFs" href="../00index_j.html">
|
|
<link rel="alternate" hreflang="en" title="English" href="../en/rename.html">
|
|
<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
|
|
<title>FatFs - f_rename</title>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="para func">
|
|
<h2>f_rename</h2>
|
|
<p>オブジェクトの名前の変更または移動。</p>
|
|
<pre>
|
|
FRESULT f_rename (
|
|
const TCHAR* <em>OldName</em>, <span class="c">/* 古いオブジェクト名 */</span>
|
|
const TCHAR* <em>NewName</em> <span class="c">/* 新しいオブジェクト名 */</span>
|
|
);
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="para arg">
|
|
<h4>引数</h4>
|
|
<dl class="par">
|
|
<dt>OldName</dt>
|
|
<dd>変更対象のオブジェクト(ファイルまたはディレクトリ)への<a href="filename.html">パス名</a>の入った<tt>'\0'</tt>で終わる文字列へのポインタを指定します。</dd>
|
|
<dt>NewName</dt>
|
|
<dd>新しいオブジェクトのフルパス名の入った<tt>'\0'</tt>で終わる文字列へのポインタを指定します。既に存在する名前は使えません。また、ドライブ番号は指定できず、<tt>OldName</tt>で指定された論理ドライブ上のオブジェクトとして扱われます。<br>
|
|
</dl>
|
|
</div>
|
|
|
|
|
|
<div class="para ret">
|
|
<h4>戻り値</h4>
|
|
<p>
|
|
<a href="rc.html#ok">FR_OK</a>,
|
|
<a href="rc.html#de">FR_DISK_ERR</a>,
|
|
<a href="rc.html#ie">FR_INT_ERR</a>,
|
|
<a href="rc.html#nr">FR_NOT_READY</a>,
|
|
<a href="rc.html#ok">FR_NO_FILE</a>,
|
|
<a href="rc.html#np">FR_NO_PATH</a>,
|
|
<a href="rc.html#in">FR_INVALID_NAME</a>,
|
|
<a href="rc.html#ex">FR_EXIST</a>,
|
|
<a href="rc.html#wp">FR_WRITE_PROTECTED</a>,
|
|
<a href="rc.html#id">FR_INVALID_DRIVE</a>,
|
|
<a href="rc.html#ne">FR_NOT_ENABLED</a>,
|
|
<a href="rc.html#ns">FR_NO_FILESYSTEM</a>,
|
|
<a href="rc.html#tm">FR_TIMEOUT</a>,
|
|
<a href="rc.html#lo">FR_LOCKED</a>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="para desc">
|
|
<h4>解説</h4>
|
|
<p>オブジェクトの名前を変更します。また、別のディレクトリへの移動も可能です。<em>開かれているオブジェクトに対して使用してはなりません</em>。</p>
|
|
</div>
|
|
|
|
|
|
<div class="para comp">
|
|
<h4>対応情報</h4>
|
|
<p><tt>_FS_READONLY == 0</tt>で、且つ<tt>_FS_MINIMIZE == 0</tt>のときに使用可能です。</p>
|
|
</div>
|
|
|
|
|
|
<div class="para use">
|
|
<h4>使用例</h4>
|
|
<pre>
|
|
<span class="c">/* ファイルまたはサブディレクトリの名前を変更する */</span>
|
|
f_rename("oldname.txt", "newname.txt");
|
|
|
|
<span class="c">/* ファイルまたはサブディレクトリの名前の変更と別のディレクトリへの移動 */</span>
|
|
f_rename("oldname.txt", "dir1/newname.txt");
|
|
</pre>
|
|
</div>
|
|
|
|
<p class="foot"><a href="../00index_j.html">戻る</a></p>
|
|
</body>
|
|
</html>
|