chdrive.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <meta http-equiv="Content-Style-Type" content="text/css">
  6. <link rel="up" title="FatFs" href="../00index_e.html">
  7. <link rel="alternate" hreflang="ja" title="Japanese" href="../ja/chdrive.html">
  8. <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
  9. <title>FatFs - f_chdrive</title>
  10. </head>
  11. <body>
  12. <div class="para func">
  13. <h2>f_chdrive</h2>
  14. <p>The f_chdrive function changes the current drive.</p>
  15. <pre>
  16. FRESULT f_chdrive (
  17. const TCHAR* <span class="arg">path</span> <span class="c">/* [IN] Logical drive number */</span>
  18. );
  19. </pre>
  20. </div>
  21. <div class="para arg">
  22. <h4>Parameters</h4>
  23. <dl class="par">
  24. <dt>path</dt>
  25. <dd>Specifies the <a href="filename.html">logical drive number</a> to be set as the current drive.</dd>
  26. </dl>
  27. </div>
  28. <div class="para ret">
  29. <h4>Return Values</h4>
  30. <p>
  31. <a href="rc.html#ok">FR_OK</a>,
  32. <a href="rc.html#id">FR_INVALID_DRIVE</a>
  33. </p>
  34. </div>
  35. <div class="para desc">
  36. <h4>Description</h4>
  37. <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>
  38. </div>
  39. <div class="para comp">
  40. <h4>QuickInfo</h4>
  41. <p>Available when <tt>_FS_RPATH >= 1</tt> and <tt>_VOLUMES >= 2</tt>.</p>
  42. </div>
  43. <div class="para ref">
  44. <h4>See Also</h4>
  45. <p><tt><a href="chdir.html">f_chdir</a>, <a href="getcwd.html">f_getcwd</a></tt></p>
  46. </div>
  47. <p class="foot"><a href="../00index_e.html">Return</a></p>
  48. </body>
  49. </html>