<p>The f_chdrive function changes the current drive.</p>
<pre>
FRESULT f_chdrive (
const TCHAR* <spanclass="arg">path</span><spanclass="c">/* [IN] Logical drive number */</span>
);
</pre>
</div>
<divclass="para arg">
<h4>Parameters</h4>
<dlclass="par">
<dt>path</dt>
<dd>Specifies the <ahref="filename.html">logical drive number</a> to be set as the current drive.</dd>
</dl>
</div>
<divclass="para ret">
<h4>Return Values</h4>
<p>
<ahref="rc.html#ok">FR_OK</a>,
<ahref="rc.html#id">FR_INVALID_DRIVE</a>
</p>
</div>
<divclass="para desc">
<h4>Description</h4>
<p>The <tt>f_chdrive()</tt> function changes the current drive. The initial value of the current drive number is 0. Note that the current drive is retained in a static variable so that it also affects other tasks that using the file functions.</p>
</div>
<divclass="para comp">
<h4>QuickInfo</h4>
<p>Available when <tt>_FS_RPATH >= 1</tt> and <tt>_VOLUMES >= 2</tt>.</p>