]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - fatfs/documents/doc/getlabel.html
Import fatfs R0.13b
[z180-stamp.git] / fatfs / documents / doc / getlabel.html
diff --git a/fatfs/documents/doc/getlabel.html b/fatfs/documents/doc/getlabel.html
new file mode 100644 (file)
index 0000000..dfe067d
--- /dev/null
@@ -0,0 +1,90 @@
+<!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/getlabel.html">\r
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r
+<title>FatFs - f_getlabel</title>\r
+</head>\r
+\r
+<body>\r
+\r
+<div class="para func">\r
+<h2>f_getlabel</h2>\r
+<p>The f_getlabel function returns volume label and volume serial number of a volume.</p>\r
+<pre>\r
+FRESULT f_getlabel (\r
+  const TCHAR* <span class="arg">path</span>,  <span class="c">/* [IN] Drive number */</span>\r
+  TCHAR* <span class="arg">label</span>,       <span class="c">/* [OUT] Volume label */</span>\r
+  DWORD* <span class="arg">vsn</span>          <span class="c">/* [OUT] Volume serial number */</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">logical drive</a>. Null-string specifies the default drive.</dd>\r
+<dt>label</dt>\r
+<dd>Pointer to the buffer to store the volume label. If the volume has no label, a null-string will be returned. Set null pointer if this information is not needed. The buffer size should be shown below at least to avoid buffer overflow.<br>\r
+<table class="lst2">\r
+<tr><td>Configuration</td><td>FF_FS_EXFAT == 0</td><td>FF_FS_EXFAT == 1</td></tr>\r
+<tr><td>FF_USE_LFN == 0</td><td>12 items</td><td>-</td></tr>\r
+<tr><td>FF_LFN_UNICODE == 0</td><td>12 items</td><td>23 items</td></tr>\r
+<tr><td>FF_LFN_UNICODE == 1/3</td><td>12 items</td><td>12 items</td></tr>\r
+<tr><td>FF_LFN_UNICODE == 2</td><td>34 items</td><td>34 items</td></tr>\r
+</table>\r
+</dd>\r
+<dt>vsn</dt>\r
+<dd>Pointer to the <tt>DWORD</tt> variable to store the volume serial number. Set null pointer if this information is not needed.</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#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
+</p>\r
+</div>\r
+\r
+\r
+<div class="para comp">\r
+<h4>QuickInfo</h4>\r
+<p>Available when <tt><a href="config.html#use_label">FF_USE_LABEL</a> == 1</tt>.</p>\r
+</div>\r
+\r
+\r
+<div class="para use">\r
+<h4>Example</h4>\r
+<pre>\r
+    char str[12];\r
+\r
+    <span class="c">/* Get volume label of the default drive */</span>\r
+    <em>f_getlabel</em>("", str, 0);\r
+\r
+    <span class="c">/* Get volume label of the drive 2 */</span>\r
+    <em>f_getlabel</em>("2:", str, 0);\r
+</pre>\r
+</div>\r
+\r
+\r
+<div class="para ref">\r
+<h4>See Also</h4>\r
+<tt><a href="setlabel.html">f_setlabel</a></tt>\r
+</div>\r
+\r
+\r
+<p class="foot"><a href="../00index_e.html">Return</a></p>\r
+</body>\r
+</html>\r