]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - fatfs/documents/doc/chdir.html
Import fatfs R0.13b
[z180-stamp.git] / fatfs / documents / doc / chdir.html
diff --git a/fatfs/documents/doc/chdir.html b/fatfs/documents/doc/chdir.html
new file mode 100644 (file)
index 0000000..072b9e9
--- /dev/null
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
+<html lang="en">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
+<meta http-equiv="Content-Style-Type" content="text/css">\r
+<link rel="up" title="FatFs" href="../00index_e.html">\r
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/chdir.html">\r
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r
+<title>FatFs - f_chdir</title>\r
+</head>\r
+\r
+<body>\r
+\r
+<div class="para func">\r
+<h2>f_chdir</h2>\r
+<p>The <tt>f_chdir</tt> function changes the current directory of the logical drive.</p>\r
+<pre>\r
+FRESULT f_chdir (\r
+  const TCHAR* <span class="arg">path</span> <span class="c">/* [IN] Path name */</span>\r
+);\r
+</pre>\r
+</div>\r
+\r
+<div class="para arg">\r
+<h4>Parameters</h4>\r
+<dl class="par">\r
+<dt>path</dt>\r
+<dd>Pointer to the null-terminated string that specifies the <a href="filename.html">directory</a> to go.</dd>\r
+</dl>\r
+</div>\r
+\r
+\r
+<div class="para ret">\r
+<h4>Return Values</h4>\r
+<p>\r
+<a href="rc.html#ok">FR_OK</a>,\r
+<a href="rc.html#de">FR_DISK_ERR</a>,\r
+<a href="rc.html#ie">FR_INT_ERR</a>,\r
+<a href="rc.html#nr">FR_NOT_READY</a>,\r
+<a href="rc.html#np">FR_NO_PATH</a>,\r
+<a href="rc.html#in">FR_INVALID_NAME</a>,\r
+<a href="rc.html#id">FR_INVALID_DRIVE</a>,\r
+<a href="rc.html#ne">FR_NOT_ENABLED</a>,\r
+<a href="rc.html#ns">FR_NO_FILESYSTEM</a>,\r
+<a href="rc.html#tm">FR_TIMEOUT</a>,\r
+<a href="rc.html#nc">FR_NOT_ENOUGH_CORE</a>\r
+</p>\r
+</div>\r
+\r
+\r
+<div class="para desc">\r
+<h4>Description</h4>\r
+<p>The <tt>f_chdir</tt> function changes the current directory of the logical drive. Also the current drive is changed at Unix style volume ID, <tt><a href="config.html#str_volume_id">FF_STR_VOLUME_ID</a> == 2</tt>. The current directory of each logical drive is initialized to the root directory on mount.</p>\r
+<p>Note that the current directory is retained in the each file system object and the current drive is retained in a static variable, so that it also affects other tasks that use the file functions.</p>\r
+</div>\r
+\r
+\r
+<div class="para comp">\r
+<h4>QuickInfo</h4>\r
+<p>Available when <tt><a href="config.html#fs_rpath">FF_FS_RPATH</a> &gt;= 1</tt>.</p>\r
+</div>\r
+\r
+\r
+<div class="para use">\r
+<h4>Example</h4>\r
+<pre>\r
+    <span class="c">/* Change current direcoty of the current drive ("dir1" under root directory) */</span>\r
+    <em>f_chdir</em>("/dir1");\r
+\r
+    <span class="c">/* Change current direcoty of current drive (parent directory of drive 2) */</span>\r
+    <em>f_chdir</em>("2:..");\r
+\r
+    <span class="c">/* Change current direcoty of the drive "sdcard" (at DOS/Windows style volume ID) */</span>\r
+    <em>f_chdir</em>("sdcard:/dir1");\r
+\r
+    <span class="c">/* Change current direcoty of the drive "flash" and set it as current drive (at Unix style volume ID) */</span>\r
+    <em>f_chdir</em>("/flash/dir1");\r
+</pre>\r
+</div>\r
+\r
+<div class="para ref">\r
+<h4>See Also</h4>\r
+<p><tt><a href="chdrive.html">f_chdrive</a>, <a href="getcwd.html">f_getcwd</a></tt></p>\r
+</div>\r
+\r
+<p class="foot"><a href="../00index_e.html">Return</a></p>\r
+</body>\r
+</html>\r