]> cloudbase.mooo.com Git - z180-stamp.git/blame - fatfs/doc/en/chdir.html
Import fatfs R0.10c
[z180-stamp.git] / fatfs / doc / en / chdir.html
CommitLineData
53668523
L
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=iso-8859-1">\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/chdir.html">\r
8<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r
9<title>FatFs - f_chdir</title>\r
10</head>\r
11\r
12<body>\r
13\r
14<div class="para func">\r
15<h2>f_chdir</h2>\r
16<p>The f_chdir function changes the current directory of a drive.</p>\r
17<pre>\r
18FRESULT f_chdir (\r
19 const TCHAR* <span class="arg">path</span> <span class="c">/* [IN] Path name */</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>Pointer to the null-terminated string that specifies a <a href="filename.html">directory</a> to go.</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#de">FR_DISK_ERR</a>,\r
38<a href="rc.html#ie">FR_INT_ERR</a>,\r
39<a href="rc.html#nr">FR_NOT_READY</a>,\r
40<a href="rc.html#np">FR_NO_PATH</a>,\r
41<a href="rc.html#in">FR_INVALID_NAME</a>,\r
42<a href="rc.html#id">FR_INVALID_DRIVE</a>,\r
43<a href="rc.html#ne">FR_NOT_ENABLED</a>,\r
44<a href="rc.html#ns">FR_NO_FILESYSTEM</a>,\r
45<a href="rc.html#tm">FR_TIMEOUT</a>,\r
46<a href="rc.html#nc">FR_NOT_ENOUGH_CORE</a>\r
47</p>\r
48</div>\r
49\r
50\r
51<div class="para desc">\r
52<h4>Description</h4>\r
53<p>The <tt>f_chdir()</tt> function changes the current directory of the logical drive. The current directory of a drive is initialized to the root directory when the drive is auto-mounted. Note that the current directory is retained in the each file system object so that it also affects other tasks that using the volume.</p>\r
54</div>\r
55\r
56\r
57<div class="para comp">\r
58<h4>QuickInfo</h4>\r
59<p>Available when <tt>_FS_RPATH >= 1</tt>.</p>\r
60</div>\r
61\r
62\r
63<div class="para use">\r
64<h4>Example</h4>\r
65<pre>\r
66 <span class="c">/* Change current direcoty of the current drive (dir1 under root dir) */</span>\r
67 f_chdir("/dir1");\r
68\r
69 <span class="c">/* Change current direcoty of drive 2 (parent dir) */</span>\r
70 f_chdir("2:..");\r
71</pre>\r
72</div>\r
73\r
74<div class="para ref">\r
75<h4>See Also</h4>\r
76<p><tt><a href="chdrive.html">f_chdrive</a>, <a href="getcwd.html">f_getcwd</a></tt></p>\r
77</div>\r
78\r
79<p class="foot"><a href="../00index_e.html">Return</a></p>\r
80</body>\r
81</html>\r