]>
Commit | Line | Data |
---|---|---|
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r | |
2 | <html lang="en">\r | |
3 | <head>\r | |
4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r | |
5 | <meta http-equiv="Content-Style-Type" content="text/css">\r | |
6 | <link rel="up" title="FatFs" href="../00index_e.html">\r | |
7 | <link rel="alternate" hreflang="ja" title="Japanese" href="../ja/chdrive.html">\r | |
8 | <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r | |
9 | <title>FatFs - f_chdrive</title>\r | |
10 | </head>\r | |
11 | \r | |
12 | <body>\r | |
13 | \r | |
14 | <div class="para func">\r | |
15 | <h2>f_chdrive</h2>\r | |
16 | <p>The f_chdrive function changes the current drive.</p>\r | |
17 | <pre>\r | |
18 | FRESULT f_chdrive (\r | |
19 | const TCHAR* <span class="arg">path</span> <span class="c">/* [IN] Logical drive number */</span>\r | |
20 | );\r | |
21 | </pre>\r | |
22 | </div>\r | |
23 | \r | |
24 | <div class="para arg">\r | |
25 | <h4>Parameters</h4>\r | |
26 | <dl class="par">\r | |
27 | <dt>path</dt>\r | |
28 | <dd>Specifies the <a href="filename.html">logical drive number</a> to be set as the current drive.</dd>\r | |
29 | </dl>\r | |
30 | </div>\r | |
31 | \r | |
32 | \r | |
33 | <div class="para ret">\r | |
34 | <h4>Return Values</h4>\r | |
35 | <p>\r | |
36 | <a href="rc.html#ok">FR_OK</a>,\r | |
37 | <a href="rc.html#id">FR_INVALID_DRIVE</a>\r | |
38 | </p>\r | |
39 | </div>\r | |
40 | \r | |
41 | \r | |
42 | <div class="para desc">\r | |
43 | <h4>Description</h4>\r | |
44 | <p>The <tt>f_chdrive</tt> function changes only 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>\r | |
45 | </div>\r | |
46 | \r | |
47 | <div class="para comp">\r | |
48 | <h4>QuickInfo</h4>\r | |
49 | <p>Available when <tt><a href="config.html#fs_rpath">FF_FS_RPATH</a> >= 1</tt>.</p>\r | |
50 | </div>\r | |
51 | \r | |
52 | \r | |
53 | <div class="para use">\r | |
54 | <h4>Example</h4>\r | |
55 | <pre>\r | |
56 | <em>f_chdrive</em>("2:"); <span class="c">/* Set drive 2 as current drive */</span>\r | |
57 | \r | |
58 | <em>f_chdrive</em>(""); <span class="c">/* No effect (set current drive as current drive) */</span>\r | |
59 | \r | |
60 | <em>f_chdrive</em>("/flash"); <span class="c">/* Set drive "flash" as current drive (at Unix style volume ID) */</span>\r | |
61 | </pre>\r | |
62 | </div>\r | |
63 | \r | |
64 | \r | |
65 | <div class="para ref">\r | |
66 | <h4>See Also</h4>\r | |
67 | <p><tt><a href="chdir.html">f_chdir</a>, <a href="getcwd.html">f_getcwd</a></tt></p>\r | |
68 | </div>\r | |
69 | \r | |
70 | <p class="foot"><a href="../00index_e.html">Return</a></p>\r | |
71 | </body>\r | |
72 | </html>\r |