]> 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
similarity index 58%
rename from fatfs/doc/en/chdir.html
rename to fatfs/documents/doc/chdir.html
index 41935fc9632db0d5040c297037bed609db847b93..072b9e958a2b5385f0e8d2b52de6cc4abb54096a 100644 (file)
@@ -1,7 +1,7 @@
 <!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=iso-8859-1">\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
@@ -13,7 +13,7 @@
 \r
 <div class="para func">\r
 <h2>f_chdir</h2>\r
-<p>The f_chdir function changes the current directory of a drive.</p>\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
@@ -50,24 +50,31 @@ FRESULT f_chdir (
 \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. The current directory of a drive is set to the root directory when the drive is mounted. Note that the current directory is retained in the each file system object, so that it also affects other tasks that use the volume.</p>\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>_FS_RPATH >= 1</tt>.</p>\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
-    f_chdir("/dir1");\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 drive 2 (parent directory) */</span>\r
-    f_chdir("2:..");\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