You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

337 line
19KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.10"/>
  7. <title>SdFat: Arduino/libraries/SdFat/src/FatLib/FatFile.h File Reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/searchdata.js"></script>
  13. <script type="text/javascript" src="search/search.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function() { init_search(); });
  16. </script>
  17. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  18. </head>
  19. <body>
  20. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  21. <div id="titlearea">
  22. <table cellspacing="0" cellpadding="0">
  23. <tbody>
  24. <tr style="height: 56px;">
  25. <td id="projectalign" style="padding-left: 0.5em;">
  26. <div id="projectname">SdFat
  27. </div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generated by Doxygen 1.8.10 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li><a href="modules.html"><span>Modules</span></a></li>
  42. <li><a href="annotated.html"><span>Classes</span></a></li>
  43. <li class="current"><a href="files.html"><span>Files</span></a></li>
  44. <li>
  45. <div id="MSearchBox" class="MSearchBoxInactive">
  46. <span class="left">
  47. <img id="MSearchSelect" src="search/mag_sel.png"
  48. onmouseover="return searchBox.OnSearchSelectShow()"
  49. onmouseout="return searchBox.OnSearchSelectHide()"
  50. alt=""/>
  51. <input type="text" id="MSearchField" value="Search" accesskey="S"
  52. onfocus="searchBox.OnSearchFieldFocus(true)"
  53. onblur="searchBox.OnSearchFieldFocus(false)"
  54. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  55. </span><span class="right">
  56. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  57. </span>
  58. </div>
  59. </li>
  60. </ul>
  61. </div>
  62. <div id="navrow2" class="tabs2">
  63. <ul class="tablist">
  64. <li><a href="files.html"><span>File&#160;List</span></a></li>
  65. <li><a href="globals.html"><span>File&#160;Members</span></a></li>
  66. </ul>
  67. </div>
  68. <!-- window showing the filter options -->
  69. <div id="MSearchSelectWindow"
  70. onmouseover="return searchBox.OnSearchSelectShow()"
  71. onmouseout="return searchBox.OnSearchSelectHide()"
  72. onkeydown="return searchBox.OnSearchSelectKey(event)">
  73. </div>
  74. <!-- iframe showing the search results (closed by default) -->
  75. <div id="MSearchResultsWindow">
  76. <iframe src="javascript:void(0)" frameborder="0"
  77. name="MSearchResults" id="MSearchResults">
  78. </iframe>
  79. </div>
  80. <div id="nav-path" class="navpath">
  81. <ul>
  82. <li class="navelem"><a class="el" href="dir_a991eec27578c865874ede3d8ec657c2.html">Arduino</a></li><li class="navelem"><a class="el" href="dir_481cc946b8a81b8d9363a4aad6201160.html">libraries</a></li><li class="navelem"><a class="el" href="dir_1281b15c327061056ab3b326e90c50cf.html">SdFat</a></li><li class="navelem"><a class="el" href="dir_c18d6c86f7b0afecac5c3a8a9885031e.html">src</a></li><li class="navelem"><a class="el" href="dir_7e472674a7b7d2590a789f197241f95f.html">FatLib</a></li> </ul>
  83. </div>
  84. </div><!-- top -->
  85. <div class="header">
  86. <div class="summary">
  87. <a href="#nested-classes">Classes</a> &#124;
  88. <a href="#define-members">Macros</a> &#124;
  89. <a href="#var-members">Variables</a> </div>
  90. <div class="headertitle">
  91. <div class="title">FatFile.h File Reference</div> </div>
  92. </div><!--header-->
  93. <div class="contents">
  94. <p><a class="el" href="class_fat_file.html" title="Basic file class. ">FatFile</a> class.
  95. <a href="#details">More...</a></p>
  96. <div class="textblock"><code>#include &lt;string.h&gt;</code><br />
  97. <code>#include &lt;stddef.h&gt;</code><br />
  98. <code>#include &lt;limits.h&gt;</code><br />
  99. <code>#include &quot;<a class="el" href="_fat_lib_config_8h.html">FatLibConfig.h</a>&quot;</code><br />
  100. <code>#include &quot;FatApiConstants.h&quot;</code><br />
  101. <code>#include &quot;<a class="el" href="_fat_structs_8h.html">FatStructs.h</a>&quot;</code><br />
  102. <code>#include &quot;<a class="el" href="_fat_volume_8h.html">FatVolume.h</a>&quot;</code><br />
  103. </div><div class="textblock"><div class="dynheader">
  104. Include dependency graph for FatFile.h:</div>
  105. <div class="dyncontent">
  106. <div class="center"><img src="_fat_file_8h__incl.png" border="0" usemap="#_arduino_2libraries_2_sd_fat_2src_2_fat_lib_2_fat_file_8h" alt=""/></div>
  107. <map name="_arduino_2libraries_2_sd_fat_2src_2_fat_lib_2_fat_file_8h" id="_arduino_2libraries_2_sd_fat_2src_2_fat_lib_2_fat_file_8h">
  108. <area shape="rect" id="node5" href="_fat_lib_config_8h.html" title="configuration definitions " alt="" coords="107,169,212,196"/>
  109. <area shape="rect" id="node8" href="_fat_structs_8h.html" title="FAT file structures. " alt="" coords="339,169,433,196"/>
  110. <area shape="rect" id="node9" href="_fat_volume_8h.html" title="FatVolume class. " alt="" coords="197,95,293,121"/>
  111. <area shape="rect" id="node7" href="_sd_fat_config_8h.html" title="configuration definitions " alt="" coords="151,244,255,271"/>
  112. <area shape="rect" id="node10" href="_sys_call_8h.html" title="SysCall class. " alt="" coords="236,169,315,196"/>
  113. </map>
  114. </div>
  115. </div><div class="textblock"><div class="dynheader">
  116. This graph shows which files directly or indirectly include this file:</div>
  117. <div class="dyncontent">
  118. <div class="center"><img src="_fat_file_8h__dep__incl.png" border="0" usemap="#_arduino_2libraries_2_sd_fat_2src_2_fat_lib_2_fat_file_8hdep" alt=""/></div>
  119. <map name="_arduino_2libraries_2_sd_fat_2src_2_fat_lib_2_fat_file_8hdep" id="_arduino_2libraries_2_sd_fat_2src_2_fat_lib_2_fat_file_8hdep">
  120. <area shape="rect" id="node2" href="_arduino_files_8h.html" title="PrintFile class. " alt="" coords="29,95,200,136"/>
  121. <area shape="rect" id="node3" href="_fat_file_system_8h.html" title="FatFileSystem class. " alt="" coords="5,184,189,225"/>
  122. <area shape="rect" id="node4" href="ios_8h.html" title="ios_base and ios classes " alt="" coords="375,95,529,136"/>
  123. <area shape="rect" id="node9" href="fstream_8h.html" title="fstream, ifstream, and ofstream classes " alt="" coords="507,363,661,404"/>
  124. <area shape="rect" id="node11" href="_stdio_stream_8h.html" title="StdioStream class. " alt="" coords="621,95,792,136"/>
  125. <area shape="rect" id="node5" href="istream_8h.html" title="istream class " alt="" coords="213,184,368,225"/>
  126. <area shape="rect" id="node10" href="ostream_8h.html" title="ostream class " alt="" coords="392,184,547,225"/>
  127. <area shape="rect" id="node6" href="iostream_8h.html" title="iostream class " alt="" coords="359,273,513,315"/>
  128. <area shape="rect" id="node7" href="bufstream_8h.html" title="ibufstream and obufstream classes " alt="" coords="326,363,482,404"/>
  129. <area shape="rect" id="node8" href="_arduino_stream_8h.html" title="ArduinoInStream and ArduinoOutStream classes. " alt="" coords="311,452,497,493"/>
  130. </map>
  131. </div>
  132. </div><table class="memberdecls">
  133. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
  134. Classes</h2></td></tr>
  135. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html">FatFile</a></td></tr>
  136. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Basic file class. <a href="class_fat_file.html#details">More...</a><br /></td></tr>
  137. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_fat_pos__t.html">FatPos_t</a></td></tr>
  139. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal type for file position - do not use in user apps. <a href="struct_fat_pos__t.html#details">More...</a><br /></td></tr>
  140. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfname__t.html">fname_t</a></td></tr>
  142. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal type for Short <a class="el" href="class_file.html" title="Arduino SD.h style File API. ">File</a> Name - do not use in user apps. <a href="structfname__t.html#details">More...</a><br /></td></tr>
  143. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  144. </table><table class="memberdecls">
  145. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  146. Macros</h2></td></tr>
  147. <tr class="memitem:a9f85580ad6f1dfc86fff09a58ff0a1c0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fat_file_8h.html#a9f85580ad6f1dfc86fff09a58ff0a1c0">isDirSeparator</a>(c)&#160;&#160;&#160;((c) == '/')</td></tr>
  148. <tr class="separator:a9f85580ad6f1dfc86fff09a58ff0a1c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  149. <tr class="memitem:a48c60b057902adf805797f183286728d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fat_file_8h.html#a48c60b057902adf805797f183286728d">pgm_read_byte</a>(addr)&#160;&#160;&#160;(*(const unsigned char*)(addr))</td></tr>
  150. <tr class="separator:a48c60b057902adf805797f183286728d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  151. <tr class="memitem:a910fb5f01313d339d3b835d45e1e5ad0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fat_file_8h.html#a910fb5f01313d339d3b835d45e1e5ad0">pgm_read_word</a>(addr)&#160;&#160;&#160;(*(const uint16_t*)(addr))</td></tr>
  152. <tr class="separator:a910fb5f01313d339d3b835d45e1e5ad0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  153. <tr class="memitem:a75acaba9e781937468d0911423bc0c35"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fat_file_8h.html#a75acaba9e781937468d0911423bc0c35">PROGMEM</a></td></tr>
  154. <tr class="separator:a75acaba9e781937468d0911423bc0c35"><td class="memSeparator" colspan="2">&#160;</td></tr>
  155. <tr class="memitem:a9c00057fd19e916cc1aa0a5949336beb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fat_file_8h.html#a9c00057fd19e916cc1aa0a5949336beb">PSTR</a>(x)&#160;&#160;&#160;(x)</td></tr>
  156. <tr class="separator:a9c00057fd19e916cc1aa0a5949336beb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  157. </table><table class="memberdecls">
  158. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
  159. Variables</h2></td></tr>
  160. <tr class="memitem:a79e43960e1b4eecf274f5faea9c3168c"><td class="memItemLeft" align="right" valign="top">const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fat_file_8h.html#a79e43960e1b4eecf274f5faea9c3168c">FNAME_FLAG_LC_BASE</a> = <a class="el" href="_fat_structs_8h.html#a39f9b8960dba007b537e9b71c25384fe">DIR_NT_LC_BASE</a></td></tr>
  161. <tr class="separator:a79e43960e1b4eecf274f5faea9c3168c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  162. <tr class="memitem:a135b7572768b09661aa38afaceec7296"><td class="memItemLeft" align="right" valign="top">const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fat_file_8h.html#a135b7572768b09661aa38afaceec7296">FNAME_FLAG_LC_EXT</a> = <a class="el" href="_fat_structs_8h.html#a8766a8bbab6ad3da38c1b308545d7572">DIR_NT_LC_EXT</a></td></tr>
  163. <tr class="separator:a135b7572768b09661aa38afaceec7296"><td class="memSeparator" colspan="2">&#160;</td></tr>
  164. <tr class="memitem:acd45286b7dfc5ba68be18c8c3a9d298d"><td class="memItemLeft" align="right" valign="top">const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fat_file_8h.html#acd45286b7dfc5ba68be18c8c3a9d298d">FNAME_FLAG_LOST_CHARS</a> = 0X01</td></tr>
  165. <tr class="separator:acd45286b7dfc5ba68be18c8c3a9d298d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  166. <tr class="memitem:a63994c21f3b723a55247f063a1b01c9c"><td class="memItemLeft" align="right" valign="top">const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fat_file_8h.html#a63994c21f3b723a55247f063a1b01c9c">FNAME_FLAG_MIXED_CASE</a> = 0X02</td></tr>
  167. <tr class="separator:a63994c21f3b723a55247f063a1b01c9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  168. <tr class="memitem:a1a041207a19d2fd9a1e2739343ccb29b"><td class="memItemLeft" align="right" valign="top">const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fat_file_8h.html#a1a041207a19d2fd9a1e2739343ccb29b">FNAME_FLAG_NEED_LFN</a></td></tr>
  169. <tr class="separator:a1a041207a19d2fd9a1e2739343ccb29b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  170. </table>
  171. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  172. <div class="textblock"><p><a class="el" href="class_fat_file.html" title="Basic file class. ">FatFile</a> class. </p>
  173. </div><h2 class="groupheader">Macro Definition Documentation</h2>
  174. <a class="anchor" id="a9f85580ad6f1dfc86fff09a58ff0a1c0"></a>
  175. <div class="memitem">
  176. <div class="memproto">
  177. <table class="memname">
  178. <tr>
  179. <td class="memname">#define isDirSeparator</td>
  180. <td>(</td>
  181. <td class="paramtype">&#160;</td>
  182. <td class="paramname">c</td><td>)</td>
  183. <td>&#160;&#160;&#160;((c) == '/')</td>
  184. </tr>
  185. </table>
  186. </div><div class="memdoc">
  187. <p>Expression for path name separator. </p>
  188. </div>
  189. </div>
  190. <a class="anchor" id="a48c60b057902adf805797f183286728d"></a>
  191. <div class="memitem">
  192. <div class="memproto">
  193. <table class="memname">
  194. <tr>
  195. <td class="memname">#define pgm_read_byte</td>
  196. <td>(</td>
  197. <td class="paramtype">&#160;</td>
  198. <td class="paramname">addr</td><td>)</td>
  199. <td>&#160;&#160;&#160;(*(const unsigned char*)(addr))</td>
  200. </tr>
  201. </table>
  202. </div><div class="memdoc">
  203. <p>read 8-bits from flash for ARM </p>
  204. </div>
  205. </div>
  206. <a class="anchor" id="a910fb5f01313d339d3b835d45e1e5ad0"></a>
  207. <div class="memitem">
  208. <div class="memproto">
  209. <table class="memname">
  210. <tr>
  211. <td class="memname">#define pgm_read_word</td>
  212. <td>(</td>
  213. <td class="paramtype">&#160;</td>
  214. <td class="paramname">addr</td><td>)</td>
  215. <td>&#160;&#160;&#160;(*(const uint16_t*)(addr))</td>
  216. </tr>
  217. </table>
  218. </div><div class="memdoc">
  219. <p>read 16-bits from flash for ARM </p>
  220. </div>
  221. </div>
  222. <a class="anchor" id="a75acaba9e781937468d0911423bc0c35"></a>
  223. <div class="memitem">
  224. <div class="memproto">
  225. <table class="memname">
  226. <tr>
  227. <td class="memname">#define PROGMEM</td>
  228. </tr>
  229. </table>
  230. </div><div class="memdoc">
  231. <p>store in flash for ARM </p>
  232. </div>
  233. </div>
  234. <a class="anchor" id="a9c00057fd19e916cc1aa0a5949336beb"></a>
  235. <div class="memitem">
  236. <div class="memproto">
  237. <table class="memname">
  238. <tr>
  239. <td class="memname">#define PSTR</td>
  240. <td>(</td>
  241. <td class="paramtype">&#160;</td>
  242. <td class="paramname">x</td><td>)</td>
  243. <td>&#160;&#160;&#160;(x)</td>
  244. </tr>
  245. </table>
  246. </div><div class="memdoc">
  247. <p>store literal string in flash for ARM </p>
  248. </div>
  249. </div>
  250. <h2 class="groupheader">Variable Documentation</h2>
  251. <a class="anchor" id="a79e43960e1b4eecf274f5faea9c3168c"></a>
  252. <div class="memitem">
  253. <div class="memproto">
  254. <table class="memname">
  255. <tr>
  256. <td class="memname">const uint8_t FNAME_FLAG_LC_BASE = <a class="el" href="_fat_structs_8h.html#a39f9b8960dba007b537e9b71c25384fe">DIR_NT_LC_BASE</a></td>
  257. </tr>
  258. </table>
  259. </div><div class="memdoc">
  260. <p>Filename base-name is all lower case </p>
  261. </div>
  262. </div>
  263. <a class="anchor" id="a135b7572768b09661aa38afaceec7296"></a>
  264. <div class="memitem">
  265. <div class="memproto">
  266. <table class="memname">
  267. <tr>
  268. <td class="memname">const uint8_t FNAME_FLAG_LC_EXT = <a class="el" href="_fat_structs_8h.html#a8766a8bbab6ad3da38c1b308545d7572">DIR_NT_LC_EXT</a></td>
  269. </tr>
  270. </table>
  271. </div><div class="memdoc">
  272. <p>Filename extension is all lower case. </p>
  273. </div>
  274. </div>
  275. <a class="anchor" id="acd45286b7dfc5ba68be18c8c3a9d298d"></a>
  276. <div class="memitem">
  277. <div class="memproto">
  278. <table class="memname">
  279. <tr>
  280. <td class="memname">const uint8_t FNAME_FLAG_LOST_CHARS = 0X01</td>
  281. </tr>
  282. </table>
  283. </div><div class="memdoc">
  284. <p>Derived from a LFN with loss or conversion of characters. </p>
  285. </div>
  286. </div>
  287. <a class="anchor" id="a63994c21f3b723a55247f063a1b01c9c"></a>
  288. <div class="memitem">
  289. <div class="memproto">
  290. <table class="memname">
  291. <tr>
  292. <td class="memname">const uint8_t FNAME_FLAG_MIXED_CASE = 0X02</td>
  293. </tr>
  294. </table>
  295. </div><div class="memdoc">
  296. <p>Base-name or extension has mixed case. </p>
  297. </div>
  298. </div>
  299. <a class="anchor" id="a1a041207a19d2fd9a1e2739343ccb29b"></a>
  300. <div class="memitem">
  301. <div class="memproto">
  302. <table class="memname">
  303. <tr>
  304. <td class="memname">const uint8_t FNAME_FLAG_NEED_LFN</td>
  305. </tr>
  306. </table>
  307. </div><div class="memdoc">
  308. <b>Initial value:</b><div class="fragment"><div class="line">=</div>
  309. <div class="line"> <a class="code" href="_fat_file_8h.html#acd45286b7dfc5ba68be18c8c3a9d298d">FNAME_FLAG_LOST_CHARS</a> | <a class="code" href="_fat_file_8h.html#a63994c21f3b723a55247f063a1b01c9c">FNAME_FLAG_MIXED_CASE</a></div>
  310. <div class="ttc" id="_fat_file_8h_html_a63994c21f3b723a55247f063a1b01c9c"><div class="ttname"><a href="_fat_file_8h.html#a63994c21f3b723a55247f063a1b01c9c">FNAME_FLAG_MIXED_CASE</a></div><div class="ttdeci">const uint8_t FNAME_FLAG_MIXED_CASE</div><div class="ttdef"><b>Definition:</b> FatFile.h:92</div></div>
  311. <div class="ttc" id="_fat_file_8h_html_acd45286b7dfc5ba68be18c8c3a9d298d"><div class="ttname"><a href="_fat_file_8h.html#acd45286b7dfc5ba68be18c8c3a9d298d">FNAME_FLAG_LOST_CHARS</a></div><div class="ttdeci">const uint8_t FNAME_FLAG_LOST_CHARS</div><div class="ttdef"><b>Definition:</b> FatFile.h:90</div></div>
  312. </div><!-- fragment --><p>LFN entries are required for file name. </p>
  313. </div>
  314. </div>
  315. </div><!-- contents -->
  316. <!-- start footer part -->
  317. <hr class="footer"/><address class="footer"><small>
  318. Generated on Fri Feb 12 2016 13:43:49 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  319. <img class="footer" src="doxygen.png" alt="doxygen"/>
  320. </a> 1.8.10
  321. </small></address>
  322. </body>
  323. </html>