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.

2919 line
134KB

  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: FatFile Class 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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
  43. <li><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="annotated.html"><span>Class&#160;List</span></a></li>
  65. <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
  66. <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
  67. </ul>
  68. </div>
  69. <!-- window showing the filter options -->
  70. <div id="MSearchSelectWindow"
  71. onmouseover="return searchBox.OnSearchSelectShow()"
  72. onmouseout="return searchBox.OnSearchSelectHide()"
  73. onkeydown="return searchBox.OnSearchSelectKey(event)">
  74. </div>
  75. <!-- iframe showing the search results (closed by default) -->
  76. <div id="MSearchResultsWindow">
  77. <iframe src="javascript:void(0)" frameborder="0"
  78. name="MSearchResults" id="MSearchResults">
  79. </iframe>
  80. </div>
  81. </div><!-- top -->
  82. <div class="header">
  83. <div class="summary">
  84. <a href="#pub-methods">Public Member Functions</a> &#124;
  85. <a href="#pub-static-methods">Static Public Member Functions</a> &#124;
  86. <a href="class_fat_file-members.html">List of all members</a> </div>
  87. <div class="headertitle">
  88. <div class="title">FatFile Class Reference</div> </div>
  89. </div><!--header-->
  90. <div class="contents">
  91. <p>Basic file class.
  92. <a href="class_fat_file.html#details">More...</a></p>
  93. <p><code>#include &lt;FatFile.h&gt;</code></p>
  94. <div class="dynheader">
  95. Inheritance diagram for FatFile:</div>
  96. <div class="dyncontent">
  97. <div class="center"><img src="class_fat_file__inherit__graph.png" border="0" usemap="#_fat_file_inherit__map" alt="Inheritance graph"/></div>
  98. <map name="_fat_file_inherit__map" id="_fat_file_inherit__map">
  99. <area shape="rect" id="node2" href="class_fat_stream_base.html" title="Base class for C++ style streams. " alt="" coords="72,80,185,107"/>
  100. <area shape="rect" id="node6" href="class_file.html" title="Arduino SD.h style File API. " alt="" coords="210,80,253,107"/>
  101. <area shape="rect" id="node7" href="class_print_file.html" title="FatFile with Print. " alt="" coords="277,80,348,107"/>
  102. <area shape="rect" id="node8" href="class_sd_base_file.html" title="Class for backward compatibility. " alt="" coords="372,80,461,107"/>
  103. <area shape="rect" id="node9" href="class_stdio_stream.html" title="StdioStream implements a minimal stdio stream. " alt="" coords="485,80,580,107"/>
  104. <area shape="rect" id="node3" href="classfstream.html" title="file input/output stream. " alt="" coords="5,155,71,181"/>
  105. <area shape="rect" id="node4" href="classifstream.html" title="file input stream. " alt="" coords="95,155,163,181"/>
  106. <area shape="rect" id="node5" href="classofstream.html" title="file output stream. " alt="" coords="187,155,259,181"/>
  107. </map>
  108. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  109. <table class="memberdecls">
  110. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  111. Public Member Functions</h2></td></tr>
  112. <tr class="memitem:ac1fa779d98db7ffdb96f8019ab0060d6"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ac1fa779d98db7ffdb96f8019ab0060d6">available</a> ()</td></tr>
  113. <tr class="separator:ac1fa779d98db7ffdb96f8019ab0060d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <tr class="memitem:a052e2c15a39b322a5307b693b8835b22"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a052e2c15a39b322a5307b693b8835b22">clearError</a> ()</td></tr>
  115. <tr class="separator:a052e2c15a39b322a5307b693b8835b22"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="memitem:aeca2a2eff91e6aa55fe1b0e3860c9a05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aeca2a2eff91e6aa55fe1b0e3860c9a05">clearWriteError</a> ()</td></tr>
  117. <tr class="separator:aeca2a2eff91e6aa55fe1b0e3860c9a05"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <tr class="memitem:afd16af325e0642e4bff6430b7d8bb18b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#afd16af325e0642e4bff6430b7d8bb18b">close</a> ()</td></tr>
  119. <tr class="separator:afd16af325e0642e4bff6430b7d8bb18b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:aa367708bcc8bc0e0c45c0c2a812c65da"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aa367708bcc8bc0e0c45c0c2a812c65da">contiguousRange</a> (uint32_t *bgnBlock, uint32_t *endBlock)</td></tr>
  121. <tr class="separator:aa367708bcc8bc0e0c45c0c2a812c65da"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:a0afc2a1cffa238d1cb2049bfa2d8d199"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a0afc2a1cffa238d1cb2049bfa2d8d199">createContiguous</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dirFile, const char *path, uint32_t size)</td></tr>
  123. <tr class="separator:a0afc2a1cffa238d1cb2049bfa2d8d199"><td class="memSeparator" colspan="2">&#160;</td></tr>
  124. <tr class="memitem:a4c03e2f6729526786e6ab4a623e0339b"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a4c03e2f6729526786e6ab4a623e0339b">curCluster</a> () const </td></tr>
  125. <tr class="separator:a4c03e2f6729526786e6ab4a623e0339b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:a20c55b134bfd1d287a00bf64eba9332e"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a20c55b134bfd1d287a00bf64eba9332e">curPosition</a> () const </td></tr>
  127. <tr class="separator:a20c55b134bfd1d287a00bf64eba9332e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  128. <tr class="memitem:a6858d18c807411a071fd6d1b39d50087"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a6858d18c807411a071fd6d1b39d50087">dirEntry</a> (<a class="el" href="_fat_structs_8h.html#a803db59d4e16a0c54a647afc6a7954e3">dir_t</a> *dir)</td></tr>
  129. <tr class="separator:a6858d18c807411a071fd6d1b39d50087"><td class="memSeparator" colspan="2">&#160;</td></tr>
  130. <tr class="memitem:ae5ec24d4a94d3780384d3f2b731c7eb9"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ae5ec24d4a94d3780384d3f2b731c7eb9">dirIndex</a> ()</td></tr>
  131. <tr class="separator:ae5ec24d4a94d3780384d3f2b731c7eb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. <tr class="memitem:ae2ed15f05c9ccbce355e7a8d3ce8382d"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ae2ed15f05c9ccbce355e7a8d3ce8382d">dirSize</a> ()</td></tr>
  133. <tr class="separator:ae2ed15f05c9ccbce355e7a8d3ce8382d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  134. <tr class="memitem:a4f01d27954ae49aeb6888ac7302f55d9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a4f01d27954ae49aeb6888ac7302f55d9">dmpFile</a> (<a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *pr, uint32_t pos, size_t n)</td></tr>
  135. <tr class="separator:a4f01d27954ae49aeb6888ac7302f55d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  136. <tr class="memitem:a50242f98dea0d4488ce4039a279f2a57"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a50242f98dea0d4488ce4039a279f2a57">exists</a> (const char *path)</td></tr>
  137. <tr class="separator:a50242f98dea0d4488ce4039a279f2a57"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:a7b591c9b92165fa8e4eae8c30c30e533"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a7b591c9b92165fa8e4eae8c30c30e533">FatFile</a> ()</td></tr>
  139. <tr class="separator:a7b591c9b92165fa8e4eae8c30c30e533"><td class="memSeparator" colspan="2">&#160;</td></tr>
  140. <tr class="memitem:a29d31067d0aa3a9a74b1a660c38775cc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a29d31067d0aa3a9a74b1a660c38775cc">FatFile</a> (const char *path, uint8_t oflag)</td></tr>
  141. <tr class="separator:a29d31067d0aa3a9a74b1a660c38775cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  142. <tr class="memitem:a31ef26b3ee37cf5f5f4c6024c0ddab69"><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a31ef26b3ee37cf5f5f4c6024c0ddab69">fgets</a> (char *str, int16_t num, char *delim=0)</td></tr>
  143. <tr class="separator:a31ef26b3ee37cf5f5f4c6024c0ddab69"><td class="memSeparator" colspan="2">&#160;</td></tr>
  144. <tr class="memitem:a7e043dfb89d268bfd620bbbadacf1002"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a7e043dfb89d268bfd620bbbadacf1002">fileAttr</a> () const </td></tr>
  145. <tr class="separator:a7e043dfb89d268bfd620bbbadacf1002"><td class="memSeparator" colspan="2">&#160;</td></tr>
  146. <tr class="memitem:a02fc3b3ca36b4745f695f3de8c8ec36d"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a02fc3b3ca36b4745f695f3de8c8ec36d">fileSize</a> () const </td></tr>
  147. <tr class="separator:a02fc3b3ca36b4745f695f3de8c8ec36d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  148. <tr class="memitem:a1057bc23b92a074539f661e896e79a09"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a1057bc23b92a074539f661e896e79a09">firstCluster</a> () const </td></tr>
  149. <tr class="separator:a1057bc23b92a074539f661e896e79a09"><td class="memSeparator" colspan="2">&#160;</td></tr>
  150. <tr class="memitem:ad0dbbd083180f44c7a3ce7124d4ce19c"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ad0dbbd083180f44c7a3ce7124d4ce19c">getError</a> ()</td></tr>
  151. <tr class="separator:ad0dbbd083180f44c7a3ce7124d4ce19c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  152. <tr class="memitem:aafa565e286440aab612cdb430fc01da5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aafa565e286440aab612cdb430fc01da5">getName</a> (char *name, size_t size)</td></tr>
  153. <tr class="separator:aafa565e286440aab612cdb430fc01da5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  154. <tr class="memitem:aaa4f9886887947815a61eaf015996932"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aaa4f9886887947815a61eaf015996932">getpos</a> (<a class="el" href="struct_fat_pos__t.html">FatPos_t</a> *pos)</td></tr>
  155. <tr class="separator:aaa4f9886887947815a61eaf015996932"><td class="memSeparator" colspan="2">&#160;</td></tr>
  156. <tr class="memitem:aba30e92a66f8e0d2f815c85662772a58"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aba30e92a66f8e0d2f815c85662772a58">getSFN</a> (char *name)</td></tr>
  157. <tr class="separator:aba30e92a66f8e0d2f815c85662772a58"><td class="memSeparator" colspan="2">&#160;</td></tr>
  158. <tr class="memitem:a8062c0d3a118e8d77d0310418703d5f5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a8062c0d3a118e8d77d0310418703d5f5">getWriteError</a> ()</td></tr>
  159. <tr class="separator:a8062c0d3a118e8d77d0310418703d5f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  160. <tr class="memitem:aef41d65e0f1ce753d18cc9ed691f7de4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aef41d65e0f1ce753d18cc9ed691f7de4">isDir</a> () const </td></tr>
  161. <tr class="separator:aef41d65e0f1ce753d18cc9ed691f7de4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  162. <tr class="memitem:afcf6270ea8d4a3a5f8e89523bc684e22"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#afcf6270ea8d4a3a5f8e89523bc684e22">isFile</a> () const </td></tr>
  163. <tr class="separator:afcf6270ea8d4a3a5f8e89523bc684e22"><td class="memSeparator" colspan="2">&#160;</td></tr>
  164. <tr class="memitem:a7eefe7408f34b6326f0c6e78af7eb05f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a7eefe7408f34b6326f0c6e78af7eb05f">isHidden</a> () const </td></tr>
  165. <tr class="separator:a7eefe7408f34b6326f0c6e78af7eb05f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  166. <tr class="memitem:aed36d17f8fde597b6ed9446faec1f7e3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aed36d17f8fde597b6ed9446faec1f7e3">isLFN</a> () const </td></tr>
  167. <tr class="separator:aed36d17f8fde597b6ed9446faec1f7e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  168. <tr class="memitem:a4c8a07b081f04aa25839c6f56c739bdc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a4c8a07b081f04aa25839c6f56c739bdc">isOpen</a> () const </td></tr>
  169. <tr class="separator:a4c8a07b081f04aa25839c6f56c739bdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  170. <tr class="memitem:a6872d3acb1e70f81c9c2be2495977583"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a6872d3acb1e70f81c9c2be2495977583">isReadOnly</a> () const </td></tr>
  171. <tr class="separator:a6872d3acb1e70f81c9c2be2495977583"><td class="memSeparator" colspan="2">&#160;</td></tr>
  172. <tr class="memitem:aa4a206803a4bf8243be20244c1aef4d2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aa4a206803a4bf8243be20244c1aef4d2">isRoot</a> () const </td></tr>
  173. <tr class="separator:aa4a206803a4bf8243be20244c1aef4d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  174. <tr class="memitem:a1449b294e3a838396c62e47674ca8cf0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a1449b294e3a838396c62e47674ca8cf0">isRoot32</a> () const </td></tr>
  175. <tr class="separator:a1449b294e3a838396c62e47674ca8cf0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  176. <tr class="memitem:a8215bd4b21e11ec83fa88ef226ceb06f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a8215bd4b21e11ec83fa88ef226ceb06f">isRootFixed</a> () const </td></tr>
  177. <tr class="separator:a8215bd4b21e11ec83fa88ef226ceb06f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  178. <tr class="memitem:a95b503b17442c2b364a2f53de1b2aeba"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a95b503b17442c2b364a2f53de1b2aeba">isSubDir</a> () const </td></tr>
  179. <tr class="separator:a95b503b17442c2b364a2f53de1b2aeba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  180. <tr class="memitem:add932e13e5bf32ad467af6ec34824e3c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#add932e13e5bf32ad467af6ec34824e3c">isSystem</a> () const </td></tr>
  181. <tr class="separator:add932e13e5bf32ad467af6ec34824e3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  182. <tr class="memitem:ad49f688a494b351ccbb0102dcfafb925"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ad49f688a494b351ccbb0102dcfafb925">ls</a> (uint8_t flags=0)</td></tr>
  183. <tr class="separator:ad49f688a494b351ccbb0102dcfafb925"><td class="memSeparator" colspan="2">&#160;</td></tr>
  184. <tr class="memitem:acabf31ff85e696fbf384c49428012fea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#acabf31ff85e696fbf384c49428012fea">ls</a> (<a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *pr, uint8_t flags=0, uint8_t indent=0)</td></tr>
  185. <tr class="separator:acabf31ff85e696fbf384c49428012fea"><td class="memSeparator" colspan="2">&#160;</td></tr>
  186. <tr class="memitem:abab5b9f72cc796388dd4eed01d13d90d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#abab5b9f72cc796388dd4eed01d13d90d">mkdir</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dir, const char *path, bool pFlag=true)</td></tr>
  187. <tr class="separator:abab5b9f72cc796388dd4eed01d13d90d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  188. <tr class="memitem:a5f64576d3d19177ab3cf3812b69abdfa"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a5f64576d3d19177ab3cf3812b69abdfa">open</a> (<a class="el" href="class_fat_file_system.html">FatFileSystem</a> *fs, const char *path, uint8_t oflag)</td></tr>
  189. <tr class="separator:a5f64576d3d19177ab3cf3812b69abdfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  190. <tr class="memitem:ad3fa9daaccb4e4179fb88a8ca037aa80"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ad3fa9daaccb4e4179fb88a8ca037aa80">open</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dirFile, uint16_t index, uint8_t oflag)</td></tr>
  191. <tr class="separator:ad3fa9daaccb4e4179fb88a8ca037aa80"><td class="memSeparator" colspan="2">&#160;</td></tr>
  192. <tr class="memitem:a211be757679b18708f6b6a36464e4f61"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a211be757679b18708f6b6a36464e4f61">open</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dirFile, const char *path, uint8_t oflag)</td></tr>
  193. <tr class="separator:a211be757679b18708f6b6a36464e4f61"><td class="memSeparator" colspan="2">&#160;</td></tr>
  194. <tr class="memitem:ab0e7075062c89f356441f80fc64d03e6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ab0e7075062c89f356441f80fc64d03e6">open</a> (const char *path, uint8_t oflag=O_READ)</td></tr>
  195. <tr class="separator:ab0e7075062c89f356441f80fc64d03e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  196. <tr class="memitem:a8034c4649eb0d26715b1a8a69e73d9d0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a8034c4649eb0d26715b1a8a69e73d9d0">openNext</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dirFile, uint8_t oflag=O_READ)</td></tr>
  197. <tr class="separator:a8034c4649eb0d26715b1a8a69e73d9d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  198. <tr class="memitem:a7e0c0548fed3a69e7284b91b694439d4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a7e0c0548fed3a69e7284b91b694439d4">openRoot</a> (<a class="el" href="class_fat_volume.html">FatVolume</a> *vol)</td></tr>
  199. <tr class="separator:a7e0c0548fed3a69e7284b91b694439d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  200. <tr class="memitem:ac05b7136b887539426856c623869aa3a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ac05b7136b887539426856c623869aa3a">peek</a> ()</td></tr>
  201. <tr class="separator:ac05b7136b887539426856c623869aa3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  202. <tr class="memitem:a558530f20314a8d8ee3d1a488fc7f46e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a558530f20314a8d8ee3d1a488fc7f46e">printCreateDateTime</a> (<a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *pr)</td></tr>
  203. <tr class="separator:a558530f20314a8d8ee3d1a488fc7f46e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  204. <tr class="memitem:a7478cad0f9e5079311b9e1fa558016ff"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a7478cad0f9e5079311b9e1fa558016ff">printField</a> (float value, char term, uint8_t prec=2)</td></tr>
  205. <tr class="separator:a7478cad0f9e5079311b9e1fa558016ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
  206. <tr class="memitem:abd3e1747511216462b3ef98167156cbb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#abd3e1747511216462b3ef98167156cbb">printField</a> (int16_t value, char term)</td></tr>
  207. <tr class="separator:abd3e1747511216462b3ef98167156cbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  208. <tr class="memitem:a9972c2419c293ef9c382bff666b9ae4d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a9972c2419c293ef9c382bff666b9ae4d">printField</a> (uint16_t value, char term)</td></tr>
  209. <tr class="separator:a9972c2419c293ef9c382bff666b9ae4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  210. <tr class="memitem:a41b3b32dd8482429b74c7af3432d6cf8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a41b3b32dd8482429b74c7af3432d6cf8">printField</a> (int32_t value, char term)</td></tr>
  211. <tr class="separator:a41b3b32dd8482429b74c7af3432d6cf8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  212. <tr class="memitem:a097240f08baadeb1c64b63eab9afb088"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a097240f08baadeb1c64b63eab9afb088">printField</a> (uint32_t value, char term)</td></tr>
  213. <tr class="separator:a097240f08baadeb1c64b63eab9afb088"><td class="memSeparator" colspan="2">&#160;</td></tr>
  214. <tr class="memitem:a12a5d2de2737c201aa39ca1bd2ab9c47"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a12a5d2de2737c201aa39ca1bd2ab9c47">printFileSize</a> (<a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *pr)</td></tr>
  215. <tr class="separator:a12a5d2de2737c201aa39ca1bd2ab9c47"><td class="memSeparator" colspan="2">&#160;</td></tr>
  216. <tr class="memitem:a05cee5df46a370bf916d3ba597c82e39"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a05cee5df46a370bf916d3ba597c82e39">printModifyDateTime</a> (<a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *pr)</td></tr>
  217. <tr class="separator:a05cee5df46a370bf916d3ba597c82e39"><td class="memSeparator" colspan="2">&#160;</td></tr>
  218. <tr class="memitem:ad1cbc3aeb0f5193b7a26595966da9621"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ad1cbc3aeb0f5193b7a26595966da9621">printName</a> ()</td></tr>
  219. <tr class="separator:ad1cbc3aeb0f5193b7a26595966da9621"><td class="memSeparator" colspan="2">&#160;</td></tr>
  220. <tr class="memitem:afe18a787fb8640e2d2483370c770f82f"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#afe18a787fb8640e2d2483370c770f82f">printName</a> (<a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *pr)</td></tr>
  221. <tr class="separator:afe18a787fb8640e2d2483370c770f82f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  222. <tr class="memitem:a791cd7aade71f609aab62ec018aea3c0"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a791cd7aade71f609aab62ec018aea3c0">printSFN</a> (<a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *pr)</td></tr>
  223. <tr class="separator:a791cd7aade71f609aab62ec018aea3c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  224. <tr class="memitem:a60ae55ff6fe158c2340071d702a363c5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a60ae55ff6fe158c2340071d702a363c5">read</a> ()</td></tr>
  225. <tr class="separator:a60ae55ff6fe158c2340071d702a363c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  226. <tr class="memitem:a200e6e0553d5b709520c9dfac9ef77dd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a200e6e0553d5b709520c9dfac9ef77dd">read</a> (void *buf, size_t nbyte)</td></tr>
  227. <tr class="separator:a200e6e0553d5b709520c9dfac9ef77dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  228. <tr class="memitem:a1325afe074c3efecff666678cd9f116a"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a1325afe074c3efecff666678cd9f116a">readDir</a> (<a class="el" href="_fat_structs_8h.html#a803db59d4e16a0c54a647afc6a7954e3">dir_t</a> *dir)</td></tr>
  229. <tr class="separator:a1325afe074c3efecff666678cd9f116a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  230. <tr class="memitem:ac837a537fbcca14c7aa390c5fc9f4e7c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ac837a537fbcca14c7aa390c5fc9f4e7c">remove</a> ()</td></tr>
  231. <tr class="separator:ac837a537fbcca14c7aa390c5fc9f4e7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  232. <tr class="memitem:a4b42f2454ff462555c07ea094a92a1e0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a4b42f2454ff462555c07ea094a92a1e0">rename</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dirFile, const char *newPath)</td></tr>
  233. <tr class="separator:a4b42f2454ff462555c07ea094a92a1e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  234. <tr class="memitem:a5aac6e0b3cb08fc8b8668e916a8b0ca5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a5aac6e0b3cb08fc8b8668e916a8b0ca5">rewind</a> ()</td></tr>
  235. <tr class="separator:a5aac6e0b3cb08fc8b8668e916a8b0ca5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  236. <tr class="memitem:a9515bac181d33e7f0125e88fa2ccd283"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a9515bac181d33e7f0125e88fa2ccd283">rmdir</a> ()</td></tr>
  237. <tr class="separator:a9515bac181d33e7f0125e88fa2ccd283"><td class="memSeparator" colspan="2">&#160;</td></tr>
  238. <tr class="memitem:ac780a80526f86d3def701ecdc99d8bfe"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ac780a80526f86d3def701ecdc99d8bfe">rmRfStar</a> ()</td></tr>
  239. <tr class="separator:ac780a80526f86d3def701ecdc99d8bfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
  240. <tr class="memitem:a5812037ea30777cc350698ad26f2c73f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a5812037ea30777cc350698ad26f2c73f">seekCur</a> (int32_t offset)</td></tr>
  241. <tr class="separator:a5812037ea30777cc350698ad26f2c73f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  242. <tr class="memitem:a84f677f4e75ef6fa2eb632f4cdf6b486"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a84f677f4e75ef6fa2eb632f4cdf6b486">seekEnd</a> (int32_t offset=0)</td></tr>
  243. <tr class="separator:a84f677f4e75ef6fa2eb632f4cdf6b486"><td class="memSeparator" colspan="2">&#160;</td></tr>
  244. <tr class="memitem:ab067190d25733ed7e697d9890f61fd7a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ab067190d25733ed7e697d9890f61fd7a">seekSet</a> (uint32_t pos)</td></tr>
  245. <tr class="separator:ab067190d25733ed7e697d9890f61fd7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  246. <tr class="memitem:acf264de4e3ca36c5e8a39e56173c9044"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#acf264de4e3ca36c5e8a39e56173c9044">setpos</a> (<a class="el" href="struct_fat_pos__t.html">FatPos_t</a> *pos)</td></tr>
  247. <tr class="separator:acf264de4e3ca36c5e8a39e56173c9044"><td class="memSeparator" colspan="2">&#160;</td></tr>
  248. <tr class="memitem:a67f3dc4896c542d695e11aac927f585e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a67f3dc4896c542d695e11aac927f585e">sync</a> ()</td></tr>
  249. <tr class="separator:a67f3dc4896c542d695e11aac927f585e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  250. <tr class="memitem:aa53a8d1d2467ad9af7d61cbf8ee85243"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aa53a8d1d2467ad9af7d61cbf8ee85243">timestamp</a> (<a class="el" href="class_fat_file.html">FatFile</a> *file)</td></tr>
  251. <tr class="separator:aa53a8d1d2467ad9af7d61cbf8ee85243"><td class="memSeparator" colspan="2">&#160;</td></tr>
  252. <tr class="memitem:a56dabdf73833b7e961c4530eb8e16d23"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a56dabdf73833b7e961c4530eb8e16d23">timestamp</a> (uint8_t flags, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)</td></tr>
  253. <tr class="separator:a56dabdf73833b7e961c4530eb8e16d23"><td class="memSeparator" colspan="2">&#160;</td></tr>
  254. <tr class="memitem:aa6e663098a578635d37d92e82d18d616"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aa6e663098a578635d37d92e82d18d616">truncate</a> (uint32_t length)</td></tr>
  255. <tr class="separator:aa6e663098a578635d37d92e82d18d616"><td class="memSeparator" colspan="2">&#160;</td></tr>
  256. <tr class="memitem:a3c64bd8a9abb9a6461d4addb405614df"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_fat_volume.html">FatVolume</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a3c64bd8a9abb9a6461d4addb405614df">volume</a> () const </td></tr>
  257. <tr class="separator:a3c64bd8a9abb9a6461d4addb405614df"><td class="memSeparator" colspan="2">&#160;</td></tr>
  258. <tr class="memitem:aa4a5b81161994cea07938702cdfce49f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aa4a5b81161994cea07938702cdfce49f">write</a> (const char *str)</td></tr>
  259. <tr class="separator:aa4a5b81161994cea07938702cdfce49f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  260. <tr class="memitem:a5524bd9f3b8f54ee163e391cba618186"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a5524bd9f3b8f54ee163e391cba618186">write</a> (uint8_t b)</td></tr>
  261. <tr class="separator:a5524bd9f3b8f54ee163e391cba618186"><td class="memSeparator" colspan="2">&#160;</td></tr>
  262. <tr class="memitem:a0ab9df44a9ee4b6eb0a78f15f1e30004"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a0ab9df44a9ee4b6eb0a78f15f1e30004">write</a> (const void *buf, size_t nbyte)</td></tr>
  263. <tr class="separator:a0ab9df44a9ee4b6eb0a78f15f1e30004"><td class="memSeparator" colspan="2">&#160;</td></tr>
  264. </table><table class="memberdecls">
  265. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
  266. Static Public Member Functions</h2></td></tr>
  267. <tr class="memitem:a3b68e603ad8e47bad915f0547e580adb"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_fat_file.html">FatFile</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a3b68e603ad8e47bad915f0547e580adb">cwd</a> ()</td></tr>
  268. <tr class="separator:a3b68e603ad8e47bad915f0547e580adb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  269. <tr class="memitem:a29a623f50df057e8b49045ba6611ec2b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a29a623f50df057e8b49045ba6611ec2b">dateTimeCallback</a> (void(*dateTime)(uint16_t *date, uint16_t *time))</td></tr>
  270. <tr class="separator:a29a623f50df057e8b49045ba6611ec2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  271. <tr class="memitem:a5df02f1d037e6091375488af25244ebc"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a5df02f1d037e6091375488af25244ebc">dateTimeCallbackCancel</a> ()</td></tr>
  272. <tr class="separator:a5df02f1d037e6091375488af25244ebc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  273. <tr class="memitem:a648461081fe07578780f4cd3f246cb66"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a648461081fe07578780f4cd3f246cb66">dirName</a> (const <a class="el" href="_fat_structs_8h.html#a803db59d4e16a0c54a647afc6a7954e3">dir_t</a> *dir, char *name)</td></tr>
  274. <tr class="separator:a648461081fe07578780f4cd3f246cb66"><td class="memSeparator" colspan="2">&#160;</td></tr>
  275. <tr class="memitem:a94df8090f16e9666cdc53ca20f6aff90"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a94df8090f16e9666cdc53ca20f6aff90">legal83Char</a> (uint8_t c)</td></tr>
  276. <tr class="separator:a94df8090f16e9666cdc53ca20f6aff90"><td class="memSeparator" colspan="2">&#160;</td></tr>
  277. <tr class="memitem:a8fdb038aafdf3a17ac80b53c063aa73b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a8fdb038aafdf3a17ac80b53c063aa73b">printFatDate</a> (uint16_t fatDate)</td></tr>
  278. <tr class="separator:a8fdb038aafdf3a17ac80b53c063aa73b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  279. <tr class="memitem:ada5364f66204b1a64afbf9d2e6cd2b0b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ada5364f66204b1a64afbf9d2e6cd2b0b">printFatDate</a> (<a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *pr, uint16_t fatDate)</td></tr>
  280. <tr class="separator:ada5364f66204b1a64afbf9d2e6cd2b0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  281. <tr class="memitem:a7740731f08ef97de7dfbc9b075c4c7d1"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a7740731f08ef97de7dfbc9b075c4c7d1">printFatTime</a> (uint16_t fatTime)</td></tr>
  282. <tr class="separator:a7740731f08ef97de7dfbc9b075c4c7d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  283. <tr class="memitem:a4e7e56ba52ca17c602af1b85684b09a9"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a4e7e56ba52ca17c602af1b85684b09a9">printFatTime</a> (<a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *pr, uint16_t fatTime)</td></tr>
  284. <tr class="separator:a4e7e56ba52ca17c602af1b85684b09a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  285. <tr class="memitem:afe820bbb056863e91ec482961c8dc695"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#afe820bbb056863e91ec482961c8dc695">remove</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dirFile, const char *path)</td></tr>
  286. <tr class="separator:afe820bbb056863e91ec482961c8dc695"><td class="memSeparator" colspan="2">&#160;</td></tr>
  287. <tr class="memitem:a360ef9c05e677271bed6c0a4d663634c"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a360ef9c05e677271bed6c0a4d663634c">setCwd</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dir)</td></tr>
  288. <tr class="separator:a360ef9c05e677271bed6c0a4d663634c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  289. </table>
  290. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  291. <div class="textblock"><p>Basic file class. </p>
  292. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  293. <a class="anchor" id="a7b591c9b92165fa8e4eae8c30c30e533"></a>
  294. <div class="memitem">
  295. <div class="memproto">
  296. <table class="mlabels">
  297. <tr>
  298. <td class="mlabels-left">
  299. <table class="memname">
  300. <tr>
  301. <td class="memname">FatFile::FatFile </td>
  302. <td>(</td>
  303. <td class="paramname"></td><td>)</td>
  304. <td></td>
  305. </tr>
  306. </table>
  307. </td>
  308. <td class="mlabels-right">
  309. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  310. </tr>
  311. </table>
  312. </div><div class="memdoc">
  313. <p>Create an instance. </p>
  314. </div>
  315. </div>
  316. <a class="anchor" id="a29d31067d0aa3a9a74b1a660c38775cc"></a>
  317. <div class="memitem">
  318. <div class="memproto">
  319. <table class="mlabels">
  320. <tr>
  321. <td class="mlabels-left">
  322. <table class="memname">
  323. <tr>
  324. <td class="memname">FatFile::FatFile </td>
  325. <td>(</td>
  326. <td class="paramtype">const char *&#160;</td>
  327. <td class="paramname"><em>path</em>, </td>
  328. </tr>
  329. <tr>
  330. <td class="paramkey"></td>
  331. <td></td>
  332. <td class="paramtype">uint8_t&#160;</td>
  333. <td class="paramname"><em>oflag</em>&#160;</td>
  334. </tr>
  335. <tr>
  336. <td></td>
  337. <td>)</td>
  338. <td></td><td></td>
  339. </tr>
  340. </table>
  341. </td>
  342. <td class="mlabels-right">
  343. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  344. </tr>
  345. </table>
  346. </div><div class="memdoc">
  347. <p>Create a file object and open it in the current working directory.</p>
  348. <dl class="params"><dt>Parameters</dt><dd>
  349. <table class="params">
  350. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path with a valid 8.3 DOS name for a file to be opened.</td></tr>
  351. <tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>Values for <em>oflag</em> are constructed by a bitwise-inclusive OR of open flags. see <a class="el" href="class_fat_file.html#a211be757679b18708f6b6a36464e4f61">FatFile::open(FatFile*, const char*, uint8_t)</a>. </td></tr>
  352. </table>
  353. </dd>
  354. </dl>
  355. </div>
  356. </div>
  357. <h2 class="groupheader">Member Function Documentation</h2>
  358. <a class="anchor" id="ac1fa779d98db7ffdb96f8019ab0060d6"></a>
  359. <div class="memitem">
  360. <div class="memproto">
  361. <table class="mlabels">
  362. <tr>
  363. <td class="mlabels-left">
  364. <table class="memname">
  365. <tr>
  366. <td class="memname">uint32_t FatFile::available </td>
  367. <td>(</td>
  368. <td class="paramname"></td><td>)</td>
  369. <td></td>
  370. </tr>
  371. </table>
  372. </td>
  373. <td class="mlabels-right">
  374. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  375. </tr>
  376. </table>
  377. </div><div class="memdoc">
  378. <dl class="section return"><dt>Returns</dt><dd>The number of bytes available from the current position to EOF for normal files. Zero is returned for directory files. </dd></dl>
  379. </div>
  380. </div>
  381. <a class="anchor" id="a052e2c15a39b322a5307b693b8835b22"></a>
  382. <div class="memitem">
  383. <div class="memproto">
  384. <table class="mlabels">
  385. <tr>
  386. <td class="mlabels-left">
  387. <table class="memname">
  388. <tr>
  389. <td class="memname">void FatFile::clearError </td>
  390. <td>(</td>
  391. <td class="paramname"></td><td>)</td>
  392. <td></td>
  393. </tr>
  394. </table>
  395. </td>
  396. <td class="mlabels-right">
  397. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  398. </tr>
  399. </table>
  400. </div><div class="memdoc">
  401. <p>Clear all error bits. </p>
  402. </div>
  403. </div>
  404. <a class="anchor" id="aeca2a2eff91e6aa55fe1b0e3860c9a05"></a>
  405. <div class="memitem">
  406. <div class="memproto">
  407. <table class="mlabels">
  408. <tr>
  409. <td class="mlabels-left">
  410. <table class="memname">
  411. <tr>
  412. <td class="memname">void FatFile::clearWriteError </td>
  413. <td>(</td>
  414. <td class="paramname"></td><td>)</td>
  415. <td></td>
  416. </tr>
  417. </table>
  418. </td>
  419. <td class="mlabels-right">
  420. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  421. </tr>
  422. </table>
  423. </div><div class="memdoc">
  424. <p>Set writeError to zero </p>
  425. </div>
  426. </div>
  427. <a class="anchor" id="afd16af325e0642e4bff6430b7d8bb18b"></a>
  428. <div class="memitem">
  429. <div class="memproto">
  430. <table class="memname">
  431. <tr>
  432. <td class="memname">bool FatFile::close </td>
  433. <td>(</td>
  434. <td class="paramname"></td><td>)</td>
  435. <td></td>
  436. </tr>
  437. </table>
  438. </div><div class="memdoc">
  439. <p>Close a file and force cached data and directory information to be written to the storage device.</p>
  440. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  441. </div>
  442. </div>
  443. <a class="anchor" id="aa367708bcc8bc0e0c45c0c2a812c65da"></a>
  444. <div class="memitem">
  445. <div class="memproto">
  446. <table class="memname">
  447. <tr>
  448. <td class="memname">bool FatFile::contiguousRange </td>
  449. <td>(</td>
  450. <td class="paramtype">uint32_t *&#160;</td>
  451. <td class="paramname"><em>bgnBlock</em>, </td>
  452. </tr>
  453. <tr>
  454. <td class="paramkey"></td>
  455. <td></td>
  456. <td class="paramtype">uint32_t *&#160;</td>
  457. <td class="paramname"><em>endBlock</em>&#160;</td>
  458. </tr>
  459. <tr>
  460. <td></td>
  461. <td>)</td>
  462. <td></td><td></td>
  463. </tr>
  464. </table>
  465. </div><div class="memdoc">
  466. <p>Check for contiguous file and return its raw block range.</p>
  467. <dl class="params"><dt>Parameters</dt><dd>
  468. <table class="params">
  469. <tr><td class="paramdir">[out]</td><td class="paramname">bgnBlock</td><td>the first block address for the file. </td></tr>
  470. <tr><td class="paramdir">[out]</td><td class="paramname">endBlock</td><td>the last block address for the file.</td></tr>
  471. </table>
  472. </dd>
  473. </dl>
  474. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  475. </div>
  476. </div>
  477. <a class="anchor" id="a0afc2a1cffa238d1cb2049bfa2d8d199"></a>
  478. <div class="memitem">
  479. <div class="memproto">
  480. <table class="memname">
  481. <tr>
  482. <td class="memname">bool FatFile::createContiguous </td>
  483. <td>(</td>
  484. <td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> *&#160;</td>
  485. <td class="paramname"><em>dirFile</em>, </td>
  486. </tr>
  487. <tr>
  488. <td class="paramkey"></td>
  489. <td></td>
  490. <td class="paramtype">const char *&#160;</td>
  491. <td class="paramname"><em>path</em>, </td>
  492. </tr>
  493. <tr>
  494. <td class="paramkey"></td>
  495. <td></td>
  496. <td class="paramtype">uint32_t&#160;</td>
  497. <td class="paramname"><em>size</em>&#160;</td>
  498. </tr>
  499. <tr>
  500. <td></td>
  501. <td>)</td>
  502. <td></td><td></td>
  503. </tr>
  504. </table>
  505. </div><div class="memdoc">
  506. <p>Create and open a new contiguous file of a specified size.</p>
  507. <dl class="params"><dt>Parameters</dt><dd>
  508. <table class="params">
  509. <tr><td class="paramdir">[in]</td><td class="paramname">dirFile</td><td>The directory where the file will be created. </td></tr>
  510. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path with a valid DOS 8.3 file name. </td></tr>
  511. <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The desired file size.</td></tr>
  512. </table>
  513. </dd>
  514. </dl>
  515. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false, is returned for failure. </dd></dl>
  516. </div>
  517. </div>
  518. <a class="anchor" id="a4c03e2f6729526786e6ab4a623e0339b"></a>
  519. <div class="memitem">
  520. <div class="memproto">
  521. <table class="mlabels">
  522. <tr>
  523. <td class="mlabels-left">
  524. <table class="memname">
  525. <tr>
  526. <td class="memname">uint32_t FatFile::curCluster </td>
  527. <td>(</td>
  528. <td class="paramname"></td><td>)</td>
  529. <td> const</td>
  530. </tr>
  531. </table>
  532. </td>
  533. <td class="mlabels-right">
  534. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  535. </tr>
  536. </table>
  537. </div><div class="memdoc">
  538. <dl class="section return"><dt>Returns</dt><dd>The current cluster number for a file or directory. </dd></dl>
  539. </div>
  540. </div>
  541. <a class="anchor" id="a20c55b134bfd1d287a00bf64eba9332e"></a>
  542. <div class="memitem">
  543. <div class="memproto">
  544. <table class="mlabels">
  545. <tr>
  546. <td class="mlabels-left">
  547. <table class="memname">
  548. <tr>
  549. <td class="memname">uint32_t FatFile::curPosition </td>
  550. <td>(</td>
  551. <td class="paramname"></td><td>)</td>
  552. <td> const</td>
  553. </tr>
  554. </table>
  555. </td>
  556. <td class="mlabels-right">
  557. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  558. </tr>
  559. </table>
  560. </div><div class="memdoc">
  561. <dl class="section return"><dt>Returns</dt><dd>The current position for a file or directory. </dd></dl>
  562. </div>
  563. </div>
  564. <a class="anchor" id="a3b68e603ad8e47bad915f0547e580adb"></a>
  565. <div class="memitem">
  566. <div class="memproto">
  567. <table class="mlabels">
  568. <tr>
  569. <td class="mlabels-left">
  570. <table class="memname">
  571. <tr>
  572. <td class="memname">static <a class="el" href="class_fat_file.html">FatFile</a>* FatFile::cwd </td>
  573. <td>(</td>
  574. <td class="paramname"></td><td>)</td>
  575. <td></td>
  576. </tr>
  577. </table>
  578. </td>
  579. <td class="mlabels-right">
  580. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
  581. </tr>
  582. </table>
  583. </div><div class="memdoc">
  584. <dl class="section return"><dt>Returns</dt><dd>Current working directory </dd></dl>
  585. </div>
  586. </div>
  587. <a class="anchor" id="a29a623f50df057e8b49045ba6611ec2b"></a>
  588. <div class="memitem">
  589. <div class="memproto">
  590. <table class="mlabels">
  591. <tr>
  592. <td class="mlabels-left">
  593. <table class="memname">
  594. <tr>
  595. <td class="memname">static void FatFile::dateTimeCallback </td>
  596. <td>(</td>
  597. <td class="paramtype">void(*)(uint16_t *date, uint16_t *time)&#160;</td>
  598. <td class="paramname"><em>dateTime</em></td><td>)</td>
  599. <td></td>
  600. </tr>
  601. </table>
  602. </td>
  603. <td class="mlabels-right">
  604. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
  605. </tr>
  606. </table>
  607. </div><div class="memdoc">
  608. <p>Set the date/time callback function</p>
  609. <dl class="params"><dt>Parameters</dt><dd>
  610. <table class="params">
  611. <tr><td class="paramdir">[in]</td><td class="paramname">dateTime</td><td>The user's call back function. The callback function is of the form:</td></tr>
  612. </table>
  613. </dd>
  614. </dl>
  615. <div class="fragment"><div class="line"><span class="keywordtype">void</span> dateTime(uint16_t* date, uint16_t* time) {</div>
  616. <div class="line"> uint16_t year;</div>
  617. <div class="line"> uint8_t month, day, hour, minute, second;</div>
  618. <div class="line"></div>
  619. <div class="line"> <span class="comment">// User gets date and time from GPS or real-time clock here</span></div>
  620. <div class="line"></div>
  621. <div class="line"> <span class="comment">// return date using FAT_DATE macro to format fields</span></div>
  622. <div class="line"> *date = <a class="code" href="_fat_structs_8h.html#a44899ad42ddf32ff1c1a73b5251b304a">FAT_DATE</a>(year, month, day);</div>
  623. <div class="line"></div>
  624. <div class="line"> <span class="comment">// return time using FAT_TIME macro to format fields</span></div>
  625. <div class="line"> *time = <a class="code" href="_fat_structs_8h.html#a375720927be5a39475d48b2d75dae29a">FAT_TIME</a>(hour, minute, second);</div>
  626. <div class="line">}</div>
  627. </div><!-- fragment --><p>Sets the function that is called when a file is created or when a file's directory entry is modified by <a class="el" href="class_fat_file.html#a67f3dc4896c542d695e11aac927f585e">sync()</a>. All timestamps, access, creation, and modify, are set when a file is created. <a class="el" href="class_fat_file.html#a67f3dc4896c542d695e11aac927f585e">sync()</a> maintains the last access date and last modify date/time.</p>
  628. <p>See the <a class="el" href="class_fat_file.html#aa53a8d1d2467ad9af7d61cbf8ee85243">timestamp()</a> function. </p>
  629. </div>
  630. </div>
  631. <a class="anchor" id="a5df02f1d037e6091375488af25244ebc"></a>
  632. <div class="memitem">
  633. <div class="memproto">
  634. <table class="mlabels">
  635. <tr>
  636. <td class="mlabels-left">
  637. <table class="memname">
  638. <tr>
  639. <td class="memname">static void FatFile::dateTimeCallbackCancel </td>
  640. <td>(</td>
  641. <td class="paramname"></td><td>)</td>
  642. <td></td>
  643. </tr>
  644. </table>
  645. </td>
  646. <td class="mlabels-right">
  647. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
  648. </tr>
  649. </table>
  650. </div><div class="memdoc">
  651. <p>Cancel the date/time callback function. </p>
  652. </div>
  653. </div>
  654. <a class="anchor" id="a6858d18c807411a071fd6d1b39d50087"></a>
  655. <div class="memitem">
  656. <div class="memproto">
  657. <table class="memname">
  658. <tr>
  659. <td class="memname">bool FatFile::dirEntry </td>
  660. <td>(</td>
  661. <td class="paramtype"><a class="el" href="_fat_structs_8h.html#a803db59d4e16a0c54a647afc6a7954e3">dir_t</a> *&#160;</td>
  662. <td class="paramname"><em>dir</em></td><td>)</td>
  663. <td></td>
  664. </tr>
  665. </table>
  666. </div><div class="memdoc">
  667. <p>Return a file's directory entry.</p>
  668. <dl class="params"><dt>Parameters</dt><dd>
  669. <table class="params">
  670. <tr><td class="paramdir">[out]</td><td class="paramname">dir</td><td>Location for return of the file's directory entry.</td></tr>
  671. </table>
  672. </dd>
  673. </dl>
  674. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  675. </div>
  676. </div>
  677. <a class="anchor" id="ae5ec24d4a94d3780384d3f2b731c7eb9"></a>
  678. <div class="memitem">
  679. <div class="memproto">
  680. <table class="mlabels">
  681. <tr>
  682. <td class="mlabels-left">
  683. <table class="memname">
  684. <tr>
  685. <td class="memname">uint16_t FatFile::dirIndex </td>
  686. <td>(</td>
  687. <td class="paramname"></td><td>)</td>
  688. <td></td>
  689. </tr>
  690. </table>
  691. </td>
  692. <td class="mlabels-right">
  693. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  694. </tr>
  695. </table>
  696. </div><div class="memdoc">
  697. <dl class="section return"><dt>Returns</dt><dd>The index of this file in it's directory. </dd></dl>
  698. </div>
  699. </div>
  700. <a class="anchor" id="a648461081fe07578780f4cd3f246cb66"></a>
  701. <div class="memitem">
  702. <div class="memproto">
  703. <table class="mlabels">
  704. <tr>
  705. <td class="mlabels-left">
  706. <table class="memname">
  707. <tr>
  708. <td class="memname">uint8_t FatFile::dirName </td>
  709. <td>(</td>
  710. <td class="paramtype">const <a class="el" href="_fat_structs_8h.html#a803db59d4e16a0c54a647afc6a7954e3">dir_t</a> *&#160;</td>
  711. <td class="paramname"><em>dir</em>, </td>
  712. </tr>
  713. <tr>
  714. <td class="paramkey"></td>
  715. <td></td>
  716. <td class="paramtype">char *&#160;</td>
  717. <td class="paramname"><em>name</em>&#160;</td>
  718. </tr>
  719. <tr>
  720. <td></td>
  721. <td>)</td>
  722. <td></td><td></td>
  723. </tr>
  724. </table>
  725. </td>
  726. <td class="mlabels-right">
  727. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  728. </tr>
  729. </table>
  730. </div><div class="memdoc">
  731. <p>Format the name field of <em>dir</em> into the 13 byte array <em>name</em> in standard 8.3 short name format.</p>
  732. <dl class="params"><dt>Parameters</dt><dd>
  733. <table class="params">
  734. <tr><td class="paramdir">[in]</td><td class="paramname">dir</td><td>The directory structure containing the name. </td></tr>
  735. <tr><td class="paramdir">[out]</td><td class="paramname">name</td><td>A 13 byte char array for the formatted name. </td></tr>
  736. </table>
  737. </dd>
  738. </dl>
  739. <dl class="section return"><dt>Returns</dt><dd>length of the name. </dd></dl>
  740. </div>
  741. </div>
  742. <a class="anchor" id="ae2ed15f05c9ccbce355e7a8d3ce8382d"></a>
  743. <div class="memitem">
  744. <div class="memproto">
  745. <table class="memname">
  746. <tr>
  747. <td class="memname">uint32_t FatFile::dirSize </td>
  748. <td>(</td>
  749. <td class="paramname"></td><td>)</td>
  750. <td></td>
  751. </tr>
  752. </table>
  753. </div><div class="memdoc">
  754. <dl class="section return"><dt>Returns</dt><dd>The number of bytes allocated to a directory or zero if an error occurs. </dd></dl>
  755. </div>
  756. </div>
  757. <a class="anchor" id="a4f01d27954ae49aeb6888ac7302f55d9"></a>
  758. <div class="memitem">
  759. <div class="memproto">
  760. <table class="memname">
  761. <tr>
  762. <td class="memname">void FatFile::dmpFile </td>
  763. <td>(</td>
  764. <td class="paramtype"><a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *&#160;</td>
  765. <td class="paramname"><em>pr</em>, </td>
  766. </tr>
  767. <tr>
  768. <td class="paramkey"></td>
  769. <td></td>
  770. <td class="paramtype">uint32_t&#160;</td>
  771. <td class="paramname"><em>pos</em>, </td>
  772. </tr>
  773. <tr>
  774. <td class="paramkey"></td>
  775. <td></td>
  776. <td class="paramtype">size_t&#160;</td>
  777. <td class="paramname"><em>n</em>&#160;</td>
  778. </tr>
  779. <tr>
  780. <td></td>
  781. <td>)</td>
  782. <td></td><td></td>
  783. </tr>
  784. </table>
  785. </div><div class="memdoc">
  786. <p>Dump file in Hex </p><dl class="params"><dt>Parameters</dt><dd>
  787. <table class="params">
  788. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for list. </td></tr>
  789. <tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>Start position in file. </td></tr>
  790. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>number of locations to dump. </td></tr>
  791. </table>
  792. </dd>
  793. </dl>
  794. </div>
  795. </div>
  796. <a class="anchor" id="a50242f98dea0d4488ce4039a279f2a57"></a>
  797. <div class="memitem">
  798. <div class="memproto">
  799. <table class="mlabels">
  800. <tr>
  801. <td class="mlabels-left">
  802. <table class="memname">
  803. <tr>
  804. <td class="memname">bool FatFile::exists </td>
  805. <td>(</td>
  806. <td class="paramtype">const char *&#160;</td>
  807. <td class="paramname"><em>path</em></td><td>)</td>
  808. <td></td>
  809. </tr>
  810. </table>
  811. </td>
  812. <td class="mlabels-right">
  813. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  814. </tr>
  815. </table>
  816. </div><div class="memdoc">
  817. <p>Test for the existence of a file in a directory</p>
  818. <dl class="params"><dt>Parameters</dt><dd>
  819. <table class="params">
  820. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>Path of the file to be tested for.</td></tr>
  821. </table>
  822. </dd>
  823. </dl>
  824. <p>The calling instance must be an open directory file.</p>
  825. <p>dirFile.exists("TOFIND.TXT") searches for "TOFIND.TXT" in the directory dirFile.</p>
  826. <dl class="section return"><dt>Returns</dt><dd>true if the file exists else false. </dd></dl>
  827. </div>
  828. </div>
  829. <a class="anchor" id="a31ef26b3ee37cf5f5f4c6024c0ddab69"></a>
  830. <div class="memitem">
  831. <div class="memproto">
  832. <table class="memname">
  833. <tr>
  834. <td class="memname">int16_t FatFile::fgets </td>
  835. <td>(</td>
  836. <td class="paramtype">char *&#160;</td>
  837. <td class="paramname"><em>str</em>, </td>
  838. </tr>
  839. <tr>
  840. <td class="paramkey"></td>
  841. <td></td>
  842. <td class="paramtype">int16_t&#160;</td>
  843. <td class="paramname"><em>num</em>, </td>
  844. </tr>
  845. <tr>
  846. <td class="paramkey"></td>
  847. <td></td>
  848. <td class="paramtype">char *&#160;</td>
  849. <td class="paramname"><em>delim</em> = <code>0</code>&#160;</td>
  850. </tr>
  851. <tr>
  852. <td></td>
  853. <td>)</td>
  854. <td></td><td></td>
  855. </tr>
  856. </table>
  857. </div><div class="memdoc">
  858. <p>Get a string from a file.</p>
  859. <p><a class="el" href="class_fat_file.html#a31ef26b3ee37cf5f5f4c6024c0ddab69">fgets()</a> reads bytes from a file into the array pointed to by <em>str</em>, until <em>num</em> - 1 bytes are read, or a delimiter is read and transferred to <em>str</em>, or end-of-file is encountered. The string is then terminated with a null byte.</p>
  860. <p><a class="el" href="class_fat_file.html#a31ef26b3ee37cf5f5f4c6024c0ddab69">fgets()</a> deletes CR, '\r', from the string. This insures only a '\n' terminates the string for Windows text files which use CRLF for newline.</p>
  861. <dl class="params"><dt>Parameters</dt><dd>
  862. <table class="params">
  863. <tr><td class="paramdir">[out]</td><td class="paramname">str</td><td>Pointer to the array where the string is stored. </td></tr>
  864. <tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>Maximum number of characters to be read (including the final null byte). Usually the length of the array <em>str</em> is used. </td></tr>
  865. <tr><td class="paramdir">[in]</td><td class="paramname">delim</td><td>Optional set of delimiters. The default is "\n".</td></tr>
  866. </table>
  867. </dd>
  868. </dl>
  869. <dl class="section return"><dt>Returns</dt><dd>For success <a class="el" href="class_fat_file.html#a31ef26b3ee37cf5f5f4c6024c0ddab69">fgets()</a> returns the length of the string in <em>str</em>. If no data is read, <a class="el" href="class_fat_file.html#a31ef26b3ee37cf5f5f4c6024c0ddab69">fgets()</a> returns zero for EOF or -1 if an error occurred. </dd></dl>
  870. </div>
  871. </div>
  872. <a class="anchor" id="a7e043dfb89d268bfd620bbbadacf1002"></a>
  873. <div class="memitem">
  874. <div class="memproto">
  875. <table class="mlabels">
  876. <tr>
  877. <td class="mlabels-left">
  878. <table class="memname">
  879. <tr>
  880. <td class="memname">uint8_t FatFile::fileAttr </td>
  881. <td>(</td>
  882. <td class="paramname"></td><td>)</td>
  883. <td> const</td>
  884. </tr>
  885. </table>
  886. </td>
  887. <td class="mlabels-right">
  888. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  889. </tr>
  890. </table>
  891. </div><div class="memdoc">
  892. <p>Type of file. You should use <a class="el" href="class_fat_file.html#afcf6270ea8d4a3a5f8e89523bc684e22">isFile()</a> or <a class="el" href="class_fat_file.html#aef41d65e0f1ce753d18cc9ed691f7de4">isDir()</a> instead of fileType() if possible.</p>
  893. <dl class="section return"><dt>Returns</dt><dd>The file or directory type. </dd></dl>
  894. </div>
  895. </div>
  896. <a class="anchor" id="a02fc3b3ca36b4745f695f3de8c8ec36d"></a>
  897. <div class="memitem">
  898. <div class="memproto">
  899. <table class="mlabels">
  900. <tr>
  901. <td class="mlabels-left">
  902. <table class="memname">
  903. <tr>
  904. <td class="memname">uint32_t FatFile::fileSize </td>
  905. <td>(</td>
  906. <td class="paramname"></td><td>)</td>
  907. <td> const</td>
  908. </tr>
  909. </table>
  910. </td>
  911. <td class="mlabels-right">
  912. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  913. </tr>
  914. </table>
  915. </div><div class="memdoc">
  916. <dl class="section return"><dt>Returns</dt><dd>The total number of bytes in a file. </dd></dl>
  917. </div>
  918. </div>
  919. <a class="anchor" id="a1057bc23b92a074539f661e896e79a09"></a>
  920. <div class="memitem">
  921. <div class="memproto">
  922. <table class="mlabels">
  923. <tr>
  924. <td class="mlabels-left">
  925. <table class="memname">
  926. <tr>
  927. <td class="memname">uint32_t FatFile::firstCluster </td>
  928. <td>(</td>
  929. <td class="paramname"></td><td>)</td>
  930. <td> const</td>
  931. </tr>
  932. </table>
  933. </td>
  934. <td class="mlabels-right">
  935. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  936. </tr>
  937. </table>
  938. </div><div class="memdoc">
  939. <dl class="section return"><dt>Returns</dt><dd>The first cluster number for a file or directory. </dd></dl>
  940. </div>
  941. </div>
  942. <a class="anchor" id="ad0dbbd083180f44c7a3ce7124d4ce19c"></a>
  943. <div class="memitem">
  944. <div class="memproto">
  945. <table class="mlabels">
  946. <tr>
  947. <td class="mlabels-left">
  948. <table class="memname">
  949. <tr>
  950. <td class="memname">uint8_t FatFile::getError </td>
  951. <td>(</td>
  952. <td class="paramname"></td><td>)</td>
  953. <td></td>
  954. </tr>
  955. </table>
  956. </td>
  957. <td class="mlabels-right">
  958. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  959. </tr>
  960. </table>
  961. </div><div class="memdoc">
  962. <dl class="section return"><dt>Returns</dt><dd>All error bits. </dd></dl>
  963. </div>
  964. </div>
  965. <a class="anchor" id="aafa565e286440aab612cdb430fc01da5"></a>
  966. <div class="memitem">
  967. <div class="memproto">
  968. <table class="memname">
  969. <tr>
  970. <td class="memname">bool FatFile::getName </td>
  971. <td>(</td>
  972. <td class="paramtype">char *&#160;</td>
  973. <td class="paramname"><em>name</em>, </td>
  974. </tr>
  975. <tr>
  976. <td class="paramkey"></td>
  977. <td></td>
  978. <td class="paramtype">size_t&#160;</td>
  979. <td class="paramname"><em>size</em>&#160;</td>
  980. </tr>
  981. <tr>
  982. <td></td>
  983. <td>)</td>
  984. <td></td><td></td>
  985. </tr>
  986. </table>
  987. </div><div class="memdoc">
  988. <p>Get a file's name followed by a zero byte.</p>
  989. <dl class="params"><dt>Parameters</dt><dd>
  990. <table class="params">
  991. <tr><td class="paramdir">[out]</td><td class="paramname">name</td><td>An array of characters for the file's name. </td></tr>
  992. <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The size of the array in bytes. The array must be at least 13 bytes long. The file's name will be truncated if the file's name is too long. </td></tr>
  993. </table>
  994. </dd>
  995. </dl>
  996. <dl class="section return"><dt>Returns</dt><dd>The value true, is returned for success and the value false, is returned for failure. </dd></dl>
  997. </div>
  998. </div>
  999. <a class="anchor" id="aaa4f9886887947815a61eaf015996932"></a>
  1000. <div class="memitem">
  1001. <div class="memproto">
  1002. <table class="memname">
  1003. <tr>
  1004. <td class="memname">void FatFile::getpos </td>
  1005. <td>(</td>
  1006. <td class="paramtype"><a class="el" href="struct_fat_pos__t.html">FatPos_t</a> *&#160;</td>
  1007. <td class="paramname"><em>pos</em></td><td>)</td>
  1008. <td></td>
  1009. </tr>
  1010. </table>
  1011. </div><div class="memdoc">
  1012. <p>get position for streams </p><dl class="params"><dt>Parameters</dt><dd>
  1013. <table class="params">
  1014. <tr><td class="paramdir">[out]</td><td class="paramname">pos</td><td>struct to receive position </td></tr>
  1015. </table>
  1016. </dd>
  1017. </dl>
  1018. </div>
  1019. </div>
  1020. <a class="anchor" id="aba30e92a66f8e0d2f815c85662772a58"></a>
  1021. <div class="memitem">
  1022. <div class="memproto">
  1023. <table class="memname">
  1024. <tr>
  1025. <td class="memname">bool FatFile::getSFN </td>
  1026. <td>(</td>
  1027. <td class="paramtype">char *&#160;</td>
  1028. <td class="paramname"><em>name</em></td><td>)</td>
  1029. <td></td>
  1030. </tr>
  1031. </table>
  1032. </div><div class="memdoc">
  1033. <p>Get a file's Short <a class="el" href="class_file.html" title="Arduino SD.h style File API. ">File</a> Name followed by a zero byte.</p>
  1034. <dl class="params"><dt>Parameters</dt><dd>
  1035. <table class="params">
  1036. <tr><td class="paramdir">[out]</td><td class="paramname">name</td><td>An array of characters for the file's name. The array must be at least 13 bytes long. </td></tr>
  1037. </table>
  1038. </dd>
  1039. </dl>
  1040. <dl class="section return"><dt>Returns</dt><dd>The value true, is returned for success and the value false, is returned for failure. </dd></dl>
  1041. </div>
  1042. </div>
  1043. <a class="anchor" id="a8062c0d3a118e8d77d0310418703d5f5"></a>
  1044. <div class="memitem">
  1045. <div class="memproto">
  1046. <table class="mlabels">
  1047. <tr>
  1048. <td class="mlabels-left">
  1049. <table class="memname">
  1050. <tr>
  1051. <td class="memname">bool FatFile::getWriteError </td>
  1052. <td>(</td>
  1053. <td class="paramname"></td><td>)</td>
  1054. <td></td>
  1055. </tr>
  1056. </table>
  1057. </td>
  1058. <td class="mlabels-right">
  1059. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1060. </tr>
  1061. </table>
  1062. </div><div class="memdoc">
  1063. <dl class="section return"><dt>Returns</dt><dd>value of writeError </dd></dl>
  1064. </div>
  1065. </div>
  1066. <a class="anchor" id="aef41d65e0f1ce753d18cc9ed691f7de4"></a>
  1067. <div class="memitem">
  1068. <div class="memproto">
  1069. <table class="mlabels">
  1070. <tr>
  1071. <td class="mlabels-left">
  1072. <table class="memname">
  1073. <tr>
  1074. <td class="memname">bool FatFile::isDir </td>
  1075. <td>(</td>
  1076. <td class="paramname"></td><td>)</td>
  1077. <td> const</td>
  1078. </tr>
  1079. </table>
  1080. </td>
  1081. <td class="mlabels-right">
  1082. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1083. </tr>
  1084. </table>
  1085. </div><div class="memdoc">
  1086. <dl class="section return"><dt>Returns</dt><dd>True if this is a directory else false. </dd></dl>
  1087. </div>
  1088. </div>
  1089. <a class="anchor" id="afcf6270ea8d4a3a5f8e89523bc684e22"></a>
  1090. <div class="memitem">
  1091. <div class="memproto">
  1092. <table class="mlabels">
  1093. <tr>
  1094. <td class="mlabels-left">
  1095. <table class="memname">
  1096. <tr>
  1097. <td class="memname">bool FatFile::isFile </td>
  1098. <td>(</td>
  1099. <td class="paramname"></td><td>)</td>
  1100. <td> const</td>
  1101. </tr>
  1102. </table>
  1103. </td>
  1104. <td class="mlabels-right">
  1105. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1106. </tr>
  1107. </table>
  1108. </div><div class="memdoc">
  1109. <dl class="section return"><dt>Returns</dt><dd>True if this is a normal file else false. </dd></dl>
  1110. </div>
  1111. </div>
  1112. <a class="anchor" id="a7eefe7408f34b6326f0c6e78af7eb05f"></a>
  1113. <div class="memitem">
  1114. <div class="memproto">
  1115. <table class="mlabels">
  1116. <tr>
  1117. <td class="mlabels-left">
  1118. <table class="memname">
  1119. <tr>
  1120. <td class="memname">bool FatFile::isHidden </td>
  1121. <td>(</td>
  1122. <td class="paramname"></td><td>)</td>
  1123. <td> const</td>
  1124. </tr>
  1125. </table>
  1126. </td>
  1127. <td class="mlabels-right">
  1128. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1129. </tr>
  1130. </table>
  1131. </div><div class="memdoc">
  1132. <dl class="section return"><dt>Returns</dt><dd>True if this is a hidden file else false. </dd></dl>
  1133. </div>
  1134. </div>
  1135. <a class="anchor" id="aed36d17f8fde597b6ed9446faec1f7e3"></a>
  1136. <div class="memitem">
  1137. <div class="memproto">
  1138. <table class="mlabels">
  1139. <tr>
  1140. <td class="mlabels-left">
  1141. <table class="memname">
  1142. <tr>
  1143. <td class="memname">bool FatFile::isLFN </td>
  1144. <td>(</td>
  1145. <td class="paramname"></td><td>)</td>
  1146. <td> const</td>
  1147. </tr>
  1148. </table>
  1149. </td>
  1150. <td class="mlabels-right">
  1151. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1152. </tr>
  1153. </table>
  1154. </div><div class="memdoc">
  1155. <dl class="section return"><dt>Returns</dt><dd>true if this file has a Long <a class="el" href="class_file.html" title="Arduino SD.h style File API. ">File</a> Name. </dd></dl>
  1156. </div>
  1157. </div>
  1158. <a class="anchor" id="a4c8a07b081f04aa25839c6f56c739bdc"></a>
  1159. <div class="memitem">
  1160. <div class="memproto">
  1161. <table class="mlabels">
  1162. <tr>
  1163. <td class="mlabels-left">
  1164. <table class="memname">
  1165. <tr>
  1166. <td class="memname">bool FatFile::isOpen </td>
  1167. <td>(</td>
  1168. <td class="paramname"></td><td>)</td>
  1169. <td> const</td>
  1170. </tr>
  1171. </table>
  1172. </td>
  1173. <td class="mlabels-right">
  1174. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1175. </tr>
  1176. </table>
  1177. </div><div class="memdoc">
  1178. <dl class="section return"><dt>Returns</dt><dd>True if this is an open file/directory else false. </dd></dl>
  1179. </div>
  1180. </div>
  1181. <a class="anchor" id="a6872d3acb1e70f81c9c2be2495977583"></a>
  1182. <div class="memitem">
  1183. <div class="memproto">
  1184. <table class="mlabels">
  1185. <tr>
  1186. <td class="mlabels-left">
  1187. <table class="memname">
  1188. <tr>
  1189. <td class="memname">bool FatFile::isReadOnly </td>
  1190. <td>(</td>
  1191. <td class="paramname"></td><td>)</td>
  1192. <td> const</td>
  1193. </tr>
  1194. </table>
  1195. </td>
  1196. <td class="mlabels-right">
  1197. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1198. </tr>
  1199. </table>
  1200. </div><div class="memdoc">
  1201. <dl class="section return"><dt>Returns</dt><dd>True if file is read-only </dd></dl>
  1202. </div>
  1203. </div>
  1204. <a class="anchor" id="aa4a206803a4bf8243be20244c1aef4d2"></a>
  1205. <div class="memitem">
  1206. <div class="memproto">
  1207. <table class="mlabels">
  1208. <tr>
  1209. <td class="mlabels-left">
  1210. <table class="memname">
  1211. <tr>
  1212. <td class="memname">bool FatFile::isRoot </td>
  1213. <td>(</td>
  1214. <td class="paramname"></td><td>)</td>
  1215. <td> const</td>
  1216. </tr>
  1217. </table>
  1218. </td>
  1219. <td class="mlabels-right">
  1220. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1221. </tr>
  1222. </table>
  1223. </div><div class="memdoc">
  1224. <dl class="section return"><dt>Returns</dt><dd>True if this is the root directory. </dd></dl>
  1225. </div>
  1226. </div>
  1227. <a class="anchor" id="a1449b294e3a838396c62e47674ca8cf0"></a>
  1228. <div class="memitem">
  1229. <div class="memproto">
  1230. <table class="mlabels">
  1231. <tr>
  1232. <td class="mlabels-left">
  1233. <table class="memname">
  1234. <tr>
  1235. <td class="memname">bool FatFile::isRoot32 </td>
  1236. <td>(</td>
  1237. <td class="paramname"></td><td>)</td>
  1238. <td> const</td>
  1239. </tr>
  1240. </table>
  1241. </td>
  1242. <td class="mlabels-right">
  1243. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1244. </tr>
  1245. </table>
  1246. </div><div class="memdoc">
  1247. <dl class="section return"><dt>Returns</dt><dd>True if this is the FAT32 root directory. </dd></dl>
  1248. </div>
  1249. </div>
  1250. <a class="anchor" id="a8215bd4b21e11ec83fa88ef226ceb06f"></a>
  1251. <div class="memitem">
  1252. <div class="memproto">
  1253. <table class="mlabels">
  1254. <tr>
  1255. <td class="mlabels-left">
  1256. <table class="memname">
  1257. <tr>
  1258. <td class="memname">bool FatFile::isRootFixed </td>
  1259. <td>(</td>
  1260. <td class="paramname"></td><td>)</td>
  1261. <td> const</td>
  1262. </tr>
  1263. </table>
  1264. </td>
  1265. <td class="mlabels-right">
  1266. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1267. </tr>
  1268. </table>
  1269. </div><div class="memdoc">
  1270. <dl class="section return"><dt>Returns</dt><dd>True if this is the FAT12 of FAT16 root directory. </dd></dl>
  1271. </div>
  1272. </div>
  1273. <a class="anchor" id="a95b503b17442c2b364a2f53de1b2aeba"></a>
  1274. <div class="memitem">
  1275. <div class="memproto">
  1276. <table class="mlabels">
  1277. <tr>
  1278. <td class="mlabels-left">
  1279. <table class="memname">
  1280. <tr>
  1281. <td class="memname">bool FatFile::isSubDir </td>
  1282. <td>(</td>
  1283. <td class="paramname"></td><td>)</td>
  1284. <td> const</td>
  1285. </tr>
  1286. </table>
  1287. </td>
  1288. <td class="mlabels-right">
  1289. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1290. </tr>
  1291. </table>
  1292. </div><div class="memdoc">
  1293. <dl class="section return"><dt>Returns</dt><dd>True if this is a subdirectory else false. </dd></dl>
  1294. </div>
  1295. </div>
  1296. <a class="anchor" id="add932e13e5bf32ad467af6ec34824e3c"></a>
  1297. <div class="memitem">
  1298. <div class="memproto">
  1299. <table class="mlabels">
  1300. <tr>
  1301. <td class="mlabels-left">
  1302. <table class="memname">
  1303. <tr>
  1304. <td class="memname">bool FatFile::isSystem </td>
  1305. <td>(</td>
  1306. <td class="paramname"></td><td>)</td>
  1307. <td> const</td>
  1308. </tr>
  1309. </table>
  1310. </td>
  1311. <td class="mlabels-right">
  1312. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1313. </tr>
  1314. </table>
  1315. </div><div class="memdoc">
  1316. <dl class="section return"><dt>Returns</dt><dd>True if this is a system file else false. </dd></dl>
  1317. </div>
  1318. </div>
  1319. <a class="anchor" id="a94df8090f16e9666cdc53ca20f6aff90"></a>
  1320. <div class="memitem">
  1321. <div class="memproto">
  1322. <table class="mlabels">
  1323. <tr>
  1324. <td class="mlabels-left">
  1325. <table class="memname">
  1326. <tr>
  1327. <td class="memname">static bool FatFile::legal83Char </td>
  1328. <td>(</td>
  1329. <td class="paramtype">uint8_t&#160;</td>
  1330. <td class="paramname"><em>c</em></td><td>)</td>
  1331. <td></td>
  1332. </tr>
  1333. </table>
  1334. </td>
  1335. <td class="mlabels-right">
  1336. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
  1337. </tr>
  1338. </table>
  1339. </div><div class="memdoc">
  1340. <p>Check for a legal 8.3 character. </p><dl class="params"><dt>Parameters</dt><dd>
  1341. <table class="params">
  1342. <tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>Character to be checked. </td></tr>
  1343. </table>
  1344. </dd>
  1345. </dl>
  1346. <dl class="section return"><dt>Returns</dt><dd>true for a legal 8.3 character else false. </dd></dl>
  1347. </div>
  1348. </div>
  1349. <a class="anchor" id="ad49f688a494b351ccbb0102dcfafb925"></a>
  1350. <div class="memitem">
  1351. <div class="memproto">
  1352. <table class="mlabels">
  1353. <tr>
  1354. <td class="mlabels-left">
  1355. <table class="memname">
  1356. <tr>
  1357. <td class="memname">void FatFile::ls </td>
  1358. <td>(</td>
  1359. <td class="paramtype">uint8_t&#160;</td>
  1360. <td class="paramname"><em>flags</em> = <code>0</code></td><td>)</td>
  1361. <td></td>
  1362. </tr>
  1363. </table>
  1364. </td>
  1365. <td class="mlabels-right">
  1366. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1367. </tr>
  1368. </table>
  1369. </div><div class="memdoc">
  1370. <p>List directory contents.</p>
  1371. <dl class="params"><dt>Parameters</dt><dd>
  1372. <table class="params">
  1373. <tr><td class="paramdir">[in]</td><td class="paramname">flags</td><td>The inclusive OR of</td></tr>
  1374. </table>
  1375. </dd>
  1376. </dl>
  1377. <p>LS_DATE - Print file modification date</p>
  1378. <p>LS_SIZE - Print file size.</p>
  1379. <p>LS_R - Recursive list of subdirectories. </p>
  1380. </div>
  1381. </div>
  1382. <a class="anchor" id="acabf31ff85e696fbf384c49428012fea"></a>
  1383. <div class="memitem">
  1384. <div class="memproto">
  1385. <table class="memname">
  1386. <tr>
  1387. <td class="memname">void FatFile::ls </td>
  1388. <td>(</td>
  1389. <td class="paramtype"><a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *&#160;</td>
  1390. <td class="paramname"><em>pr</em>, </td>
  1391. </tr>
  1392. <tr>
  1393. <td class="paramkey"></td>
  1394. <td></td>
  1395. <td class="paramtype">uint8_t&#160;</td>
  1396. <td class="paramname"><em>flags</em> = <code>0</code>, </td>
  1397. </tr>
  1398. <tr>
  1399. <td class="paramkey"></td>
  1400. <td></td>
  1401. <td class="paramtype">uint8_t&#160;</td>
  1402. <td class="paramname"><em>indent</em> = <code>0</code>&#160;</td>
  1403. </tr>
  1404. <tr>
  1405. <td></td>
  1406. <td>)</td>
  1407. <td></td><td></td>
  1408. </tr>
  1409. </table>
  1410. </div><div class="memdoc">
  1411. <p>List directory contents.</p>
  1412. <dl class="params"><dt>Parameters</dt><dd>
  1413. <table class="params">
  1414. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for list.</td></tr>
  1415. <tr><td class="paramdir">[in]</td><td class="paramname">flags</td><td>The inclusive OR of</td></tr>
  1416. </table>
  1417. </dd>
  1418. </dl>
  1419. <p>LS_DATE - Print file modification date</p>
  1420. <p>LS_SIZE - Print file size.</p>
  1421. <p>LS_R - Recursive list of subdirectories.</p>
  1422. <dl class="params"><dt>Parameters</dt><dd>
  1423. <table class="params">
  1424. <tr><td class="paramdir">[in]</td><td class="paramname">indent</td><td>Amount of space before file name. Used for recursive list to indicate subdirectory level. </td></tr>
  1425. </table>
  1426. </dd>
  1427. </dl>
  1428. </div>
  1429. </div>
  1430. <a class="anchor" id="abab5b9f72cc796388dd4eed01d13d90d"></a>
  1431. <div class="memitem">
  1432. <div class="memproto">
  1433. <table class="memname">
  1434. <tr>
  1435. <td class="memname">bool FatFile::mkdir </td>
  1436. <td>(</td>
  1437. <td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> *&#160;</td>
  1438. <td class="paramname"><em>dir</em>, </td>
  1439. </tr>
  1440. <tr>
  1441. <td class="paramkey"></td>
  1442. <td></td>
  1443. <td class="paramtype">const char *&#160;</td>
  1444. <td class="paramname"><em>path</em>, </td>
  1445. </tr>
  1446. <tr>
  1447. <td class="paramkey"></td>
  1448. <td></td>
  1449. <td class="paramtype">bool&#160;</td>
  1450. <td class="paramname"><em>pFlag</em> = <code>true</code>&#160;</td>
  1451. </tr>
  1452. <tr>
  1453. <td></td>
  1454. <td>)</td>
  1455. <td></td><td></td>
  1456. </tr>
  1457. </table>
  1458. </div><div class="memdoc">
  1459. <p>Make a new directory.</p>
  1460. <dl class="params"><dt>Parameters</dt><dd>
  1461. <table class="params">
  1462. <tr><td class="paramdir">[in]</td><td class="paramname">dir</td><td>An open <a class="el" href="class_fat_file.html" title="Basic file class. ">FatFile</a> instance for the directory that will contain the new directory.</td></tr>
  1463. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path with a valid 8.3 DOS name for the new directory.</td></tr>
  1464. <tr><td class="paramdir">[in]</td><td class="paramname">pFlag</td><td>Create missing parent directories if true.</td></tr>
  1465. </table>
  1466. </dd>
  1467. </dl>
  1468. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  1469. </div>
  1470. </div>
  1471. <a class="anchor" id="a5f64576d3d19177ab3cf3812b69abdfa"></a>
  1472. <div class="memitem">
  1473. <div class="memproto">
  1474. <table class="memname">
  1475. <tr>
  1476. <td class="memname">bool FatFile::open </td>
  1477. <td>(</td>
  1478. <td class="paramtype"><a class="el" href="class_fat_file_system.html">FatFileSystem</a> *&#160;</td>
  1479. <td class="paramname"><em>fs</em>, </td>
  1480. </tr>
  1481. <tr>
  1482. <td class="paramkey"></td>
  1483. <td></td>
  1484. <td class="paramtype">const char *&#160;</td>
  1485. <td class="paramname"><em>path</em>, </td>
  1486. </tr>
  1487. <tr>
  1488. <td class="paramkey"></td>
  1489. <td></td>
  1490. <td class="paramtype">uint8_t&#160;</td>
  1491. <td class="paramname"><em>oflag</em>&#160;</td>
  1492. </tr>
  1493. <tr>
  1494. <td></td>
  1495. <td>)</td>
  1496. <td></td><td></td>
  1497. </tr>
  1498. </table>
  1499. </div><div class="memdoc">
  1500. <p>Open a file in the volume working directory of a <a class="el" href="class_fat_file_system.html" title="Integration class for the FatLib library. ">FatFileSystem</a>.</p>
  1501. <dl class="params"><dt>Parameters</dt><dd>
  1502. <table class="params">
  1503. <tr><td class="paramdir">[in]</td><td class="paramname">fs</td><td><a class="el" href="class_file.html" title="Arduino SD.h style File API. ">File</a> System where the file is located.</td></tr>
  1504. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>with a valid 8.3 DOS name for a file to be opened.</td></tr>
  1505. <tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>bitwise-inclusive OR of open mode flags. See see <a class="el" href="class_fat_file.html#a211be757679b18708f6b6a36464e4f61">FatFile::open(FatFile*, const char*, uint8_t)</a>.</td></tr>
  1506. </table>
  1507. </dd>
  1508. </dl>
  1509. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  1510. </div>
  1511. </div>
  1512. <a class="anchor" id="ad3fa9daaccb4e4179fb88a8ca037aa80"></a>
  1513. <div class="memitem">
  1514. <div class="memproto">
  1515. <table class="memname">
  1516. <tr>
  1517. <td class="memname">bool FatFile::open </td>
  1518. <td>(</td>
  1519. <td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> *&#160;</td>
  1520. <td class="paramname"><em>dirFile</em>, </td>
  1521. </tr>
  1522. <tr>
  1523. <td class="paramkey"></td>
  1524. <td></td>
  1525. <td class="paramtype">uint16_t&#160;</td>
  1526. <td class="paramname"><em>index</em>, </td>
  1527. </tr>
  1528. <tr>
  1529. <td class="paramkey"></td>
  1530. <td></td>
  1531. <td class="paramtype">uint8_t&#160;</td>
  1532. <td class="paramname"><em>oflag</em>&#160;</td>
  1533. </tr>
  1534. <tr>
  1535. <td></td>
  1536. <td>)</td>
  1537. <td></td><td></td>
  1538. </tr>
  1539. </table>
  1540. </div><div class="memdoc">
  1541. <p>Open a file by index.</p>
  1542. <dl class="params"><dt>Parameters</dt><dd>
  1543. <table class="params">
  1544. <tr><td class="paramdir">[in]</td><td class="paramname">dirFile</td><td>An open <a class="el" href="class_fat_file.html" title="Basic file class. ">FatFile</a> instance for the directory.</td></tr>
  1545. <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The <em>index</em> of the directory entry for the file to be opened. The value for <em>index</em> is (directory file position)/32.</td></tr>
  1546. <tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>bitwise-inclusive OR of open mode flags. See see <a class="el" href="class_fat_file.html#a211be757679b18708f6b6a36464e4f61">FatFile::open(FatFile*, const char*, uint8_t)</a>.</td></tr>
  1547. </table>
  1548. </dd>
  1549. </dl>
  1550. <p>See <a class="el" href="class_fat_file.html#a5f64576d3d19177ab3cf3812b69abdfa">open()</a> by path for definition of flags. </p><dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1551. </div>
  1552. </div>
  1553. <a class="anchor" id="a211be757679b18708f6b6a36464e4f61"></a>
  1554. <div class="memitem">
  1555. <div class="memproto">
  1556. <table class="memname">
  1557. <tr>
  1558. <td class="memname">bool FatFile::open </td>
  1559. <td>(</td>
  1560. <td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> *&#160;</td>
  1561. <td class="paramname"><em>dirFile</em>, </td>
  1562. </tr>
  1563. <tr>
  1564. <td class="paramkey"></td>
  1565. <td></td>
  1566. <td class="paramtype">const char *&#160;</td>
  1567. <td class="paramname"><em>path</em>, </td>
  1568. </tr>
  1569. <tr>
  1570. <td class="paramkey"></td>
  1571. <td></td>
  1572. <td class="paramtype">uint8_t&#160;</td>
  1573. <td class="paramname"><em>oflag</em>&#160;</td>
  1574. </tr>
  1575. <tr>
  1576. <td></td>
  1577. <td>)</td>
  1578. <td></td><td></td>
  1579. </tr>
  1580. </table>
  1581. </div><div class="memdoc">
  1582. <p>Open a file or directory by name.</p>
  1583. <dl class="params"><dt>Parameters</dt><dd>
  1584. <table class="params">
  1585. <tr><td class="paramdir">[in]</td><td class="paramname">dirFile</td><td>An open <a class="el" href="class_fat_file.html" title="Basic file class. ">FatFile</a> instance for the directory containing the file to be opened.</td></tr>
  1586. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path with a valid 8.3 DOS name for a file to be opened.</td></tr>
  1587. <tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>Values for <em>oflag</em> are constructed by a bitwise-inclusive OR of flags from the following list</td></tr>
  1588. </table>
  1589. </dd>
  1590. </dl>
  1591. <p>O_READ - Open for reading.</p>
  1592. <p>O_RDONLY - Same as O_READ.</p>
  1593. <p>O_WRITE - Open for writing.</p>
  1594. <p>O_WRONLY - Same as O_WRITE.</p>
  1595. <p>O_RDWR - Open for reading and writing.</p>
  1596. <p>O_APPEND - If set, the file offset shall be set to the end of the file prior to each write.</p>
  1597. <p>O_AT_END - Set the initial position at the end of the file.</p>
  1598. <p>O_CREAT - If the file exists, this flag has no effect except as noted under O_EXCL below. Otherwise, the file shall be created</p>
  1599. <p>O_EXCL - If O_CREAT and O_EXCL are set, <a class="el" href="class_fat_file.html#a5f64576d3d19177ab3cf3812b69abdfa">open()</a> shall fail if the file exists.</p>
  1600. <p>O_SYNC - Call <a class="el" href="class_fat_file.html#a67f3dc4896c542d695e11aac927f585e">sync()</a> after each write. This flag should not be used with <a class="el" href="class_fat_file.html#a5524bd9f3b8f54ee163e391cba618186">write(uint8_t)</a> or any functions do character at a time writes since <a class="el" href="class_fat_file.html#a67f3dc4896c542d695e11aac927f585e">sync()</a> will be called after each byte.</p>
  1601. <p>O_TRUNC - If the file exists and is a regular file, and the file is successfully opened and is not read only, its length shall be truncated to 0.</p>
  1602. <p>WARNING: A given file must not be opened by more than one <a class="el" href="class_fat_file.html" title="Basic file class. ">FatFile</a> object or file corruption may occur.</p>
  1603. <dl class="section note"><dt>Note</dt><dd>Directory files must be opened read only. Write and truncation is not allowed for directory files.</dd></dl>
  1604. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  1605. </div>
  1606. </div>
  1607. <a class="anchor" id="ab0e7075062c89f356441f80fc64d03e6"></a>
  1608. <div class="memitem">
  1609. <div class="memproto">
  1610. <table class="mlabels">
  1611. <tr>
  1612. <td class="mlabels-left">
  1613. <table class="memname">
  1614. <tr>
  1615. <td class="memname">bool FatFile::open </td>
  1616. <td>(</td>
  1617. <td class="paramtype">const char *&#160;</td>
  1618. <td class="paramname"><em>path</em>, </td>
  1619. </tr>
  1620. <tr>
  1621. <td class="paramkey"></td>
  1622. <td></td>
  1623. <td class="paramtype">uint8_t&#160;</td>
  1624. <td class="paramname"><em>oflag</em> = <code>O_READ</code>&#160;</td>
  1625. </tr>
  1626. <tr>
  1627. <td></td>
  1628. <td>)</td>
  1629. <td></td><td></td>
  1630. </tr>
  1631. </table>
  1632. </td>
  1633. <td class="mlabels-right">
  1634. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1635. </tr>
  1636. </table>
  1637. </div><div class="memdoc">
  1638. <p>Open a file in the current working directory.</p>
  1639. <dl class="params"><dt>Parameters</dt><dd>
  1640. <table class="params">
  1641. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path with a valid 8.3 DOS name for a file to be opened.</td></tr>
  1642. <tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>bitwise-inclusive OR of open mode flags. See see <a class="el" href="class_fat_file.html#a211be757679b18708f6b6a36464e4f61">FatFile::open(FatFile*, const char*, uint8_t)</a>.</td></tr>
  1643. </table>
  1644. </dd>
  1645. </dl>
  1646. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  1647. </div>
  1648. </div>
  1649. <a class="anchor" id="a8034c4649eb0d26715b1a8a69e73d9d0"></a>
  1650. <div class="memitem">
  1651. <div class="memproto">
  1652. <table class="memname">
  1653. <tr>
  1654. <td class="memname">bool FatFile::openNext </td>
  1655. <td>(</td>
  1656. <td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> *&#160;</td>
  1657. <td class="paramname"><em>dirFile</em>, </td>
  1658. </tr>
  1659. <tr>
  1660. <td class="paramkey"></td>
  1661. <td></td>
  1662. <td class="paramtype">uint8_t&#160;</td>
  1663. <td class="paramname"><em>oflag</em> = <code>O_READ</code>&#160;</td>
  1664. </tr>
  1665. <tr>
  1666. <td></td>
  1667. <td>)</td>
  1668. <td></td><td></td>
  1669. </tr>
  1670. </table>
  1671. </div><div class="memdoc">
  1672. <p>Open the next file or subdirectory in a directory.</p>
  1673. <dl class="params"><dt>Parameters</dt><dd>
  1674. <table class="params">
  1675. <tr><td class="paramdir">[in]</td><td class="paramname">dirFile</td><td>An open <a class="el" href="class_fat_file.html" title="Basic file class. ">FatFile</a> instance for the directory containing the file to be opened.</td></tr>
  1676. <tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>bitwise-inclusive OR of open mode flags. See see <a class="el" href="class_fat_file.html#a211be757679b18708f6b6a36464e4f61">FatFile::open(FatFile*, const char*, uint8_t)</a>.</td></tr>
  1677. </table>
  1678. </dd>
  1679. </dl>
  1680. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1681. </div>
  1682. </div>
  1683. <a class="anchor" id="a7e0c0548fed3a69e7284b91b694439d4"></a>
  1684. <div class="memitem">
  1685. <div class="memproto">
  1686. <table class="memname">
  1687. <tr>
  1688. <td class="memname">bool FatFile::openRoot </td>
  1689. <td>(</td>
  1690. <td class="paramtype"><a class="el" href="class_fat_volume.html">FatVolume</a> *&#160;</td>
  1691. <td class="paramname"><em>vol</em></td><td>)</td>
  1692. <td></td>
  1693. </tr>
  1694. </table>
  1695. </div><div class="memdoc">
  1696. <p>Open a volume's root directory.</p>
  1697. <dl class="params"><dt>Parameters</dt><dd>
  1698. <table class="params">
  1699. <tr><td class="paramdir">[in]</td><td class="paramname">vol</td><td>The FAT volume containing the root directory to be opened.</td></tr>
  1700. </table>
  1701. </dd>
  1702. </dl>
  1703. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  1704. </div>
  1705. </div>
  1706. <a class="anchor" id="ac05b7136b887539426856c623869aa3a"></a>
  1707. <div class="memitem">
  1708. <div class="memproto">
  1709. <table class="memname">
  1710. <tr>
  1711. <td class="memname">int FatFile::peek </td>
  1712. <td>(</td>
  1713. <td class="paramname"></td><td>)</td>
  1714. <td></td>
  1715. </tr>
  1716. </table>
  1717. </div><div class="memdoc">
  1718. <p>Return the next available byte without consuming it.</p>
  1719. <dl class="section return"><dt>Returns</dt><dd>The byte if no error and not at eof else -1; </dd></dl>
  1720. </div>
  1721. </div>
  1722. <a class="anchor" id="a558530f20314a8d8ee3d1a488fc7f46e"></a>
  1723. <div class="memitem">
  1724. <div class="memproto">
  1725. <table class="memname">
  1726. <tr>
  1727. <td class="memname">bool FatFile::printCreateDateTime </td>
  1728. <td>(</td>
  1729. <td class="paramtype"><a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *&#160;</td>
  1730. <td class="paramname"><em>pr</em></td><td>)</td>
  1731. <td></td>
  1732. </tr>
  1733. </table>
  1734. </div><div class="memdoc">
  1735. <p>Print a file's creation date and time</p>
  1736. <dl class="params"><dt>Parameters</dt><dd>
  1737. <table class="params">
  1738. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
  1739. </table>
  1740. </dd>
  1741. </dl>
  1742. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  1743. </div>
  1744. </div>
  1745. <a class="anchor" id="a8fdb038aafdf3a17ac80b53c063aa73b"></a>
  1746. <div class="memitem">
  1747. <div class="memproto">
  1748. <table class="mlabels">
  1749. <tr>
  1750. <td class="mlabels-left">
  1751. <table class="memname">
  1752. <tr>
  1753. <td class="memname">static void FatFile::printFatDate </td>
  1754. <td>(</td>
  1755. <td class="paramtype">uint16_t&#160;</td>
  1756. <td class="paramname"><em>fatDate</em></td><td>)</td>
  1757. <td></td>
  1758. </tr>
  1759. </table>
  1760. </td>
  1761. <td class="mlabels-right">
  1762. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
  1763. </tr>
  1764. </table>
  1765. </div><div class="memdoc">
  1766. <p>Print a directory date field.</p>
  1767. <p>Format is yyyy-mm-dd.</p>
  1768. <dl class="params"><dt>Parameters</dt><dd>
  1769. <table class="params">
  1770. <tr><td class="paramdir">[in]</td><td class="paramname">fatDate</td><td>The date field from a directory entry. </td></tr>
  1771. </table>
  1772. </dd>
  1773. </dl>
  1774. </div>
  1775. </div>
  1776. <a class="anchor" id="ada5364f66204b1a64afbf9d2e6cd2b0b"></a>
  1777. <div class="memitem">
  1778. <div class="memproto">
  1779. <table class="mlabels">
  1780. <tr>
  1781. <td class="mlabels-left">
  1782. <table class="memname">
  1783. <tr>
  1784. <td class="memname">void FatFile::printFatDate </td>
  1785. <td>(</td>
  1786. <td class="paramtype"><a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *&#160;</td>
  1787. <td class="paramname"><em>pr</em>, </td>
  1788. </tr>
  1789. <tr>
  1790. <td class="paramkey"></td>
  1791. <td></td>
  1792. <td class="paramtype">uint16_t&#160;</td>
  1793. <td class="paramname"><em>fatDate</em>&#160;</td>
  1794. </tr>
  1795. <tr>
  1796. <td></td>
  1797. <td>)</td>
  1798. <td></td><td></td>
  1799. </tr>
  1800. </table>
  1801. </td>
  1802. <td class="mlabels-right">
  1803. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  1804. </tr>
  1805. </table>
  1806. </div><div class="memdoc">
  1807. <p>Print a directory date field.</p>
  1808. <p>Format is yyyy-mm-dd.</p>
  1809. <dl class="params"><dt>Parameters</dt><dd>
  1810. <table class="params">
  1811. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output. </td></tr>
  1812. <tr><td class="paramdir">[in]</td><td class="paramname">fatDate</td><td>The date field from a directory entry. </td></tr>
  1813. </table>
  1814. </dd>
  1815. </dl>
  1816. </div>
  1817. </div>
  1818. <a class="anchor" id="a7740731f08ef97de7dfbc9b075c4c7d1"></a>
  1819. <div class="memitem">
  1820. <div class="memproto">
  1821. <table class="mlabels">
  1822. <tr>
  1823. <td class="mlabels-left">
  1824. <table class="memname">
  1825. <tr>
  1826. <td class="memname">static void FatFile::printFatTime </td>
  1827. <td>(</td>
  1828. <td class="paramtype">uint16_t&#160;</td>
  1829. <td class="paramname"><em>fatTime</em></td><td>)</td>
  1830. <td></td>
  1831. </tr>
  1832. </table>
  1833. </td>
  1834. <td class="mlabels-right">
  1835. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
  1836. </tr>
  1837. </table>
  1838. </div><div class="memdoc">
  1839. <p>Print a directory time field.</p>
  1840. <p>Format is hh:mm:ss.</p>
  1841. <dl class="params"><dt>Parameters</dt><dd>
  1842. <table class="params">
  1843. <tr><td class="paramdir">[in]</td><td class="paramname">fatTime</td><td>The time field from a directory entry. </td></tr>
  1844. </table>
  1845. </dd>
  1846. </dl>
  1847. </div>
  1848. </div>
  1849. <a class="anchor" id="a4e7e56ba52ca17c602af1b85684b09a9"></a>
  1850. <div class="memitem">
  1851. <div class="memproto">
  1852. <table class="mlabels">
  1853. <tr>
  1854. <td class="mlabels-left">
  1855. <table class="memname">
  1856. <tr>
  1857. <td class="memname">void FatFile::printFatTime </td>
  1858. <td>(</td>
  1859. <td class="paramtype"><a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *&#160;</td>
  1860. <td class="paramname"><em>pr</em>, </td>
  1861. </tr>
  1862. <tr>
  1863. <td class="paramkey"></td>
  1864. <td></td>
  1865. <td class="paramtype">uint16_t&#160;</td>
  1866. <td class="paramname"><em>fatTime</em>&#160;</td>
  1867. </tr>
  1868. <tr>
  1869. <td></td>
  1870. <td>)</td>
  1871. <td></td><td></td>
  1872. </tr>
  1873. </table>
  1874. </td>
  1875. <td class="mlabels-right">
  1876. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  1877. </tr>
  1878. </table>
  1879. </div><div class="memdoc">
  1880. <p>Print a directory time field.</p>
  1881. <p>Format is hh:mm:ss.</p>
  1882. <dl class="params"><dt>Parameters</dt><dd>
  1883. <table class="params">
  1884. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output. </td></tr>
  1885. <tr><td class="paramdir">[in]</td><td class="paramname">fatTime</td><td>The time field from a directory entry. </td></tr>
  1886. </table>
  1887. </dd>
  1888. </dl>
  1889. </div>
  1890. </div>
  1891. <a class="anchor" id="a7478cad0f9e5079311b9e1fa558016ff"></a>
  1892. <div class="memitem">
  1893. <div class="memproto">
  1894. <table class="memname">
  1895. <tr>
  1896. <td class="memname">int FatFile::printField </td>
  1897. <td>(</td>
  1898. <td class="paramtype">float&#160;</td>
  1899. <td class="paramname"><em>value</em>, </td>
  1900. </tr>
  1901. <tr>
  1902. <td class="paramkey"></td>
  1903. <td></td>
  1904. <td class="paramtype">char&#160;</td>
  1905. <td class="paramname"><em>term</em>, </td>
  1906. </tr>
  1907. <tr>
  1908. <td class="paramkey"></td>
  1909. <td></td>
  1910. <td class="paramtype">uint8_t&#160;</td>
  1911. <td class="paramname"><em>prec</em> = <code>2</code>&#160;</td>
  1912. </tr>
  1913. <tr>
  1914. <td></td>
  1915. <td>)</td>
  1916. <td></td><td></td>
  1917. </tr>
  1918. </table>
  1919. </div><div class="memdoc">
  1920. <p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
  1921. <table class="params">
  1922. <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
  1923. <tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
  1924. <tr><td class="paramdir">[in]</td><td class="paramname">prec</td><td>Number of digits after decimal point. </td></tr>
  1925. </table>
  1926. </dd>
  1927. </dl>
  1928. <dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
  1929. </div>
  1930. </div>
  1931. <a class="anchor" id="abd3e1747511216462b3ef98167156cbb"></a>
  1932. <div class="memitem">
  1933. <div class="memproto">
  1934. <table class="memname">
  1935. <tr>
  1936. <td class="memname">int FatFile::printField </td>
  1937. <td>(</td>
  1938. <td class="paramtype">int16_t&#160;</td>
  1939. <td class="paramname"><em>value</em>, </td>
  1940. </tr>
  1941. <tr>
  1942. <td class="paramkey"></td>
  1943. <td></td>
  1944. <td class="paramtype">char&#160;</td>
  1945. <td class="paramname"><em>term</em>&#160;</td>
  1946. </tr>
  1947. <tr>
  1948. <td></td>
  1949. <td>)</td>
  1950. <td></td><td></td>
  1951. </tr>
  1952. </table>
  1953. </div><div class="memdoc">
  1954. <p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
  1955. <table class="params">
  1956. <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
  1957. <tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
  1958. </table>
  1959. </dd>
  1960. </dl>
  1961. <dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
  1962. </div>
  1963. </div>
  1964. <a class="anchor" id="a9972c2419c293ef9c382bff666b9ae4d"></a>
  1965. <div class="memitem">
  1966. <div class="memproto">
  1967. <table class="memname">
  1968. <tr>
  1969. <td class="memname">int FatFile::printField </td>
  1970. <td>(</td>
  1971. <td class="paramtype">uint16_t&#160;</td>
  1972. <td class="paramname"><em>value</em>, </td>
  1973. </tr>
  1974. <tr>
  1975. <td class="paramkey"></td>
  1976. <td></td>
  1977. <td class="paramtype">char&#160;</td>
  1978. <td class="paramname"><em>term</em>&#160;</td>
  1979. </tr>
  1980. <tr>
  1981. <td></td>
  1982. <td>)</td>
  1983. <td></td><td></td>
  1984. </tr>
  1985. </table>
  1986. </div><div class="memdoc">
  1987. <p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
  1988. <table class="params">
  1989. <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
  1990. <tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
  1991. </table>
  1992. </dd>
  1993. </dl>
  1994. <dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
  1995. </div>
  1996. </div>
  1997. <a class="anchor" id="a41b3b32dd8482429b74c7af3432d6cf8"></a>
  1998. <div class="memitem">
  1999. <div class="memproto">
  2000. <table class="memname">
  2001. <tr>
  2002. <td class="memname">int FatFile::printField </td>
  2003. <td>(</td>
  2004. <td class="paramtype">int32_t&#160;</td>
  2005. <td class="paramname"><em>value</em>, </td>
  2006. </tr>
  2007. <tr>
  2008. <td class="paramkey"></td>
  2009. <td></td>
  2010. <td class="paramtype">char&#160;</td>
  2011. <td class="paramname"><em>term</em>&#160;</td>
  2012. </tr>
  2013. <tr>
  2014. <td></td>
  2015. <td>)</td>
  2016. <td></td><td></td>
  2017. </tr>
  2018. </table>
  2019. </div><div class="memdoc">
  2020. <p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
  2021. <table class="params">
  2022. <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
  2023. <tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
  2024. </table>
  2025. </dd>
  2026. </dl>
  2027. <dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
  2028. </div>
  2029. </div>
  2030. <a class="anchor" id="a097240f08baadeb1c64b63eab9afb088"></a>
  2031. <div class="memitem">
  2032. <div class="memproto">
  2033. <table class="memname">
  2034. <tr>
  2035. <td class="memname">int FatFile::printField </td>
  2036. <td>(</td>
  2037. <td class="paramtype">uint32_t&#160;</td>
  2038. <td class="paramname"><em>value</em>, </td>
  2039. </tr>
  2040. <tr>
  2041. <td class="paramkey"></td>
  2042. <td></td>
  2043. <td class="paramtype">char&#160;</td>
  2044. <td class="paramname"><em>term</em>&#160;</td>
  2045. </tr>
  2046. <tr>
  2047. <td></td>
  2048. <td>)</td>
  2049. <td></td><td></td>
  2050. </tr>
  2051. </table>
  2052. </div><div class="memdoc">
  2053. <p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
  2054. <table class="params">
  2055. <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
  2056. <tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
  2057. </table>
  2058. </dd>
  2059. </dl>
  2060. <dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
  2061. </div>
  2062. </div>
  2063. <a class="anchor" id="a12a5d2de2737c201aa39ca1bd2ab9c47"></a>
  2064. <div class="memitem">
  2065. <div class="memproto">
  2066. <table class="memname">
  2067. <tr>
  2068. <td class="memname">size_t FatFile::printFileSize </td>
  2069. <td>(</td>
  2070. <td class="paramtype"><a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *&#160;</td>
  2071. <td class="paramname"><em>pr</em></td><td>)</td>
  2072. <td></td>
  2073. </tr>
  2074. </table>
  2075. </div><div class="memdoc">
  2076. <p>Print a file's size.</p>
  2077. <dl class="params"><dt>Parameters</dt><dd>
  2078. <table class="params">
  2079. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
  2080. </table>
  2081. </dd>
  2082. </dl>
  2083. <dl class="section return"><dt>Returns</dt><dd>The number of characters printed is returned for success and zero is returned for failure. </dd></dl>
  2084. </div>
  2085. </div>
  2086. <a class="anchor" id="a05cee5df46a370bf916d3ba597c82e39"></a>
  2087. <div class="memitem">
  2088. <div class="memproto">
  2089. <table class="memname">
  2090. <tr>
  2091. <td class="memname">bool FatFile::printModifyDateTime </td>
  2092. <td>(</td>
  2093. <td class="paramtype"><a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *&#160;</td>
  2094. <td class="paramname"><em>pr</em></td><td>)</td>
  2095. <td></td>
  2096. </tr>
  2097. </table>
  2098. </div><div class="memdoc">
  2099. <p>Print a file's modify date and time</p>
  2100. <dl class="params"><dt>Parameters</dt><dd>
  2101. <table class="params">
  2102. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
  2103. </table>
  2104. </dd>
  2105. </dl>
  2106. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2107. </div>
  2108. </div>
  2109. <a class="anchor" id="ad1cbc3aeb0f5193b7a26595966da9621"></a>
  2110. <div class="memitem">
  2111. <div class="memproto">
  2112. <table class="mlabels">
  2113. <tr>
  2114. <td class="mlabels-left">
  2115. <table class="memname">
  2116. <tr>
  2117. <td class="memname">size_t FatFile::printName </td>
  2118. <td>(</td>
  2119. <td class="paramname"></td><td>)</td>
  2120. <td></td>
  2121. </tr>
  2122. </table>
  2123. </td>
  2124. <td class="mlabels-right">
  2125. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  2126. </tr>
  2127. </table>
  2128. </div><div class="memdoc">
  2129. <p>Print a file's name.</p>
  2130. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2131. </div>
  2132. </div>
  2133. <a class="anchor" id="afe18a787fb8640e2d2483370c770f82f"></a>
  2134. <div class="memitem">
  2135. <div class="memproto">
  2136. <table class="memname">
  2137. <tr>
  2138. <td class="memname">size_t FatFile::printName </td>
  2139. <td>(</td>
  2140. <td class="paramtype"><a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *&#160;</td>
  2141. <td class="paramname"><em>pr</em></td><td>)</td>
  2142. <td></td>
  2143. </tr>
  2144. </table>
  2145. </div><div class="memdoc">
  2146. <p>Print a file's name</p>
  2147. <dl class="params"><dt>Parameters</dt><dd>
  2148. <table class="params">
  2149. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
  2150. </table>
  2151. </dd>
  2152. </dl>
  2153. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2154. </div>
  2155. </div>
  2156. <a class="anchor" id="a791cd7aade71f609aab62ec018aea3c0"></a>
  2157. <div class="memitem">
  2158. <div class="memproto">
  2159. <table class="memname">
  2160. <tr>
  2161. <td class="memname">size_t FatFile::printSFN </td>
  2162. <td>(</td>
  2163. <td class="paramtype"><a class="el" href="_fat_volume_8h.html#ac62f6449331cfe1a71f29be30efe7890">print_t</a> *&#160;</td>
  2164. <td class="paramname"><em>pr</em></td><td>)</td>
  2165. <td></td>
  2166. </tr>
  2167. </table>
  2168. </div><div class="memdoc">
  2169. <p>Print a file's Short <a class="el" href="class_file.html" title="Arduino SD.h style File API. ">File</a> Name.</p>
  2170. <dl class="params"><dt>Parameters</dt><dd>
  2171. <table class="params">
  2172. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
  2173. </table>
  2174. </dd>
  2175. </dl>
  2176. <dl class="section return"><dt>Returns</dt><dd>The number of characters printed is returned for success and zero is returned for failure. </dd></dl>
  2177. </div>
  2178. </div>
  2179. <a class="anchor" id="a60ae55ff6fe158c2340071d702a363c5"></a>
  2180. <div class="memitem">
  2181. <div class="memproto">
  2182. <table class="mlabels">
  2183. <tr>
  2184. <td class="mlabels-left">
  2185. <table class="memname">
  2186. <tr>
  2187. <td class="memname">int FatFile::read </td>
  2188. <td>(</td>
  2189. <td class="paramname"></td><td>)</td>
  2190. <td></td>
  2191. </tr>
  2192. </table>
  2193. </td>
  2194. <td class="mlabels-right">
  2195. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  2196. </tr>
  2197. </table>
  2198. </div><div class="memdoc">
  2199. <p>Read the next byte from a file.</p>
  2200. <dl class="section return"><dt>Returns</dt><dd>For success read returns the next byte in the file as an int. If an error occurs or end of file is reached -1 is returned. </dd></dl>
  2201. </div>
  2202. </div>
  2203. <a class="anchor" id="a200e6e0553d5b709520c9dfac9ef77dd"></a>
  2204. <div class="memitem">
  2205. <div class="memproto">
  2206. <table class="memname">
  2207. <tr>
  2208. <td class="memname">int FatFile::read </td>
  2209. <td>(</td>
  2210. <td class="paramtype">void *&#160;</td>
  2211. <td class="paramname"><em>buf</em>, </td>
  2212. </tr>
  2213. <tr>
  2214. <td class="paramkey"></td>
  2215. <td></td>
  2216. <td class="paramtype">size_t&#160;</td>
  2217. <td class="paramname"><em>nbyte</em>&#160;</td>
  2218. </tr>
  2219. <tr>
  2220. <td></td>
  2221. <td>)</td>
  2222. <td></td><td></td>
  2223. </tr>
  2224. </table>
  2225. </div><div class="memdoc">
  2226. <p>Read data from a file starting at the current position.</p>
  2227. <dl class="params"><dt>Parameters</dt><dd>
  2228. <table class="params">
  2229. <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Pointer to the location that will receive the data.</td></tr>
  2230. <tr><td class="paramdir">[in]</td><td class="paramname">nbyte</td><td>Maximum number of bytes to read.</td></tr>
  2231. </table>
  2232. </dd>
  2233. </dl>
  2234. <dl class="section return"><dt>Returns</dt><dd>For success <a class="el" href="class_fat_file.html#a60ae55ff6fe158c2340071d702a363c5">read()</a> returns the number of bytes read. A value less than <em>nbyte</em>, including zero, will be returned if end of file is reached. If an error occurs, <a class="el" href="class_fat_file.html#a60ae55ff6fe158c2340071d702a363c5">read()</a> returns -1. Possible errors include <a class="el" href="class_fat_file.html#a60ae55ff6fe158c2340071d702a363c5">read()</a> called before a file has been opened, corrupt file system or an I/O error occurred. </dd></dl>
  2235. </div>
  2236. </div>
  2237. <a class="anchor" id="a1325afe074c3efecff666678cd9f116a"></a>
  2238. <div class="memitem">
  2239. <div class="memproto">
  2240. <table class="memname">
  2241. <tr>
  2242. <td class="memname">int8_t FatFile::readDir </td>
  2243. <td>(</td>
  2244. <td class="paramtype"><a class="el" href="_fat_structs_8h.html#a803db59d4e16a0c54a647afc6a7954e3">dir_t</a> *&#160;</td>
  2245. <td class="paramname"><em>dir</em></td><td>)</td>
  2246. <td></td>
  2247. </tr>
  2248. </table>
  2249. </div><div class="memdoc">
  2250. <p>Read the next directory entry from a directory file.</p>
  2251. <dl class="params"><dt>Parameters</dt><dd>
  2252. <table class="params">
  2253. <tr><td class="paramdir">[out]</td><td class="paramname">dir</td><td>The dir_t struct that will receive the data.</td></tr>
  2254. </table>
  2255. </dd>
  2256. </dl>
  2257. <dl class="section return"><dt>Returns</dt><dd>For success <a class="el" href="class_fat_file.html#a1325afe074c3efecff666678cd9f116a">readDir()</a> returns the number of bytes read. A value of zero will be returned if end of file is reached. If an error occurs, <a class="el" href="class_fat_file.html#a1325afe074c3efecff666678cd9f116a">readDir()</a> returns -1. Possible errors include <a class="el" href="class_fat_file.html#a1325afe074c3efecff666678cd9f116a">readDir()</a> called before a directory has been opened, this is not a directory file or an I/O error occurred. </dd></dl>
  2258. </div>
  2259. </div>
  2260. <a class="anchor" id="ac837a537fbcca14c7aa390c5fc9f4e7c"></a>
  2261. <div class="memitem">
  2262. <div class="memproto">
  2263. <table class="memname">
  2264. <tr>
  2265. <td class="memname">bool FatFile::remove </td>
  2266. <td>(</td>
  2267. <td class="paramname"></td><td>)</td>
  2268. <td></td>
  2269. </tr>
  2270. </table>
  2271. </div><div class="memdoc">
  2272. <p>Remove a file.</p>
  2273. <p>The directory entry and all data for the file are deleted.</p>
  2274. <dl class="section note"><dt>Note</dt><dd>This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".</dd></dl>
  2275. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2276. </div>
  2277. </div>
  2278. <a class="anchor" id="afe820bbb056863e91ec482961c8dc695"></a>
  2279. <div class="memitem">
  2280. <div class="memproto">
  2281. <table class="mlabels">
  2282. <tr>
  2283. <td class="mlabels-left">
  2284. <table class="memname">
  2285. <tr>
  2286. <td class="memname">bool FatFile::remove </td>
  2287. <td>(</td>
  2288. <td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> *&#160;</td>
  2289. <td class="paramname"><em>dirFile</em>, </td>
  2290. </tr>
  2291. <tr>
  2292. <td class="paramkey"></td>
  2293. <td></td>
  2294. <td class="paramtype">const char *&#160;</td>
  2295. <td class="paramname"><em>path</em>&#160;</td>
  2296. </tr>
  2297. <tr>
  2298. <td></td>
  2299. <td>)</td>
  2300. <td></td><td></td>
  2301. </tr>
  2302. </table>
  2303. </td>
  2304. <td class="mlabels-right">
  2305. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  2306. </tr>
  2307. </table>
  2308. </div><div class="memdoc">
  2309. <p>Remove a file.</p>
  2310. <p>The directory entry and all data for the file are deleted.</p>
  2311. <dl class="params"><dt>Parameters</dt><dd>
  2312. <table class="params">
  2313. <tr><td class="paramdir">[in]</td><td class="paramname">dirFile</td><td>The directory that contains the file. </td></tr>
  2314. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>Path for the file to be removed.</td></tr>
  2315. </table>
  2316. </dd>
  2317. </dl>
  2318. <dl class="section note"><dt>Note</dt><dd>This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".</dd></dl>
  2319. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2320. </div>
  2321. </div>
  2322. <a class="anchor" id="a4b42f2454ff462555c07ea094a92a1e0"></a>
  2323. <div class="memitem">
  2324. <div class="memproto">
  2325. <table class="memname">
  2326. <tr>
  2327. <td class="memname">bool FatFile::rename </td>
  2328. <td>(</td>
  2329. <td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> *&#160;</td>
  2330. <td class="paramname"><em>dirFile</em>, </td>
  2331. </tr>
  2332. <tr>
  2333. <td class="paramkey"></td>
  2334. <td></td>
  2335. <td class="paramtype">const char *&#160;</td>
  2336. <td class="paramname"><em>newPath</em>&#160;</td>
  2337. </tr>
  2338. <tr>
  2339. <td></td>
  2340. <td>)</td>
  2341. <td></td><td></td>
  2342. </tr>
  2343. </table>
  2344. </div><div class="memdoc">
  2345. <p>Rename a file or subdirectory.</p>
  2346. <dl class="params"><dt>Parameters</dt><dd>
  2347. <table class="params">
  2348. <tr><td class="paramdir">[in]</td><td class="paramname">dirFile</td><td>Directory for the new path. </td></tr>
  2349. <tr><td class="paramdir">[in]</td><td class="paramname">newPath</td><td>New path name for the file/directory.</td></tr>
  2350. </table>
  2351. </dd>
  2352. </dl>
  2353. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2354. </div>
  2355. </div>
  2356. <a class="anchor" id="a5aac6e0b3cb08fc8b8668e916a8b0ca5"></a>
  2357. <div class="memitem">
  2358. <div class="memproto">
  2359. <table class="mlabels">
  2360. <tr>
  2361. <td class="mlabels-left">
  2362. <table class="memname">
  2363. <tr>
  2364. <td class="memname">void FatFile::rewind </td>
  2365. <td>(</td>
  2366. <td class="paramname"></td><td>)</td>
  2367. <td></td>
  2368. </tr>
  2369. </table>
  2370. </td>
  2371. <td class="mlabels-right">
  2372. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  2373. </tr>
  2374. </table>
  2375. </div><div class="memdoc">
  2376. <p>Set the file's current position to zero. </p>
  2377. </div>
  2378. </div>
  2379. <a class="anchor" id="a9515bac181d33e7f0125e88fa2ccd283"></a>
  2380. <div class="memitem">
  2381. <div class="memproto">
  2382. <table class="memname">
  2383. <tr>
  2384. <td class="memname">bool FatFile::rmdir </td>
  2385. <td>(</td>
  2386. <td class="paramname"></td><td>)</td>
  2387. <td></td>
  2388. </tr>
  2389. </table>
  2390. </div><div class="memdoc">
  2391. <p>Remove a directory file.</p>
  2392. <p>The directory file will be removed only if it is empty and is not the root directory. <a class="el" href="class_fat_file.html#a9515bac181d33e7f0125e88fa2ccd283">rmdir()</a> follows DOS and Windows and ignores the read-only attribute for the directory.</p>
  2393. <dl class="section note"><dt>Note</dt><dd>This function should not be used to delete the 8.3 version of a directory that has a long name. For example if a directory has the long name "New folder" you should not delete the 8.3 name "NEWFOL~1".</dd></dl>
  2394. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2395. </div>
  2396. </div>
  2397. <a class="anchor" id="ac780a80526f86d3def701ecdc99d8bfe"></a>
  2398. <div class="memitem">
  2399. <div class="memproto">
  2400. <table class="memname">
  2401. <tr>
  2402. <td class="memname">bool FatFile::rmRfStar </td>
  2403. <td>(</td>
  2404. <td class="paramname"></td><td>)</td>
  2405. <td></td>
  2406. </tr>
  2407. </table>
  2408. </div><div class="memdoc">
  2409. <p>Recursively delete a directory and all contained files.</p>
  2410. <p>This is like the Unix/Linux 'rm -rf *' if called with the root directory hence the name.</p>
  2411. <p>Warning - This will remove all contents of the directory including subdirectories. The directory will then be removed if it is not root. The read-only attribute for files will be ignored.</p>
  2412. <dl class="section note"><dt>Note</dt><dd>This function should not be used to delete the 8.3 version of a directory that has a long name. See <a class="el" href="class_fat_file.html#ac837a537fbcca14c7aa390c5fc9f4e7c">remove()</a> and <a class="el" href="class_fat_file.html#a9515bac181d33e7f0125e88fa2ccd283">rmdir()</a>.</dd></dl>
  2413. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2414. </div>
  2415. </div>
  2416. <a class="anchor" id="a5812037ea30777cc350698ad26f2c73f"></a>
  2417. <div class="memitem">
  2418. <div class="memproto">
  2419. <table class="mlabels">
  2420. <tr>
  2421. <td class="mlabels-left">
  2422. <table class="memname">
  2423. <tr>
  2424. <td class="memname">bool FatFile::seekCur </td>
  2425. <td>(</td>
  2426. <td class="paramtype">int32_t&#160;</td>
  2427. <td class="paramname"><em>offset</em></td><td>)</td>
  2428. <td></td>
  2429. </tr>
  2430. </table>
  2431. </td>
  2432. <td class="mlabels-right">
  2433. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  2434. </tr>
  2435. </table>
  2436. </div><div class="memdoc">
  2437. <p>Set the files position to current position + <em>pos</em>. See <a class="el" href="class_fat_file.html#ab067190d25733ed7e697d9890f61fd7a">seekSet()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  2438. <table class="params">
  2439. <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>The new position in bytes from the current position. </td></tr>
  2440. </table>
  2441. </dd>
  2442. </dl>
  2443. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  2444. </div>
  2445. </div>
  2446. <a class="anchor" id="a84f677f4e75ef6fa2eb632f4cdf6b486"></a>
  2447. <div class="memitem">
  2448. <div class="memproto">
  2449. <table class="mlabels">
  2450. <tr>
  2451. <td class="mlabels-left">
  2452. <table class="memname">
  2453. <tr>
  2454. <td class="memname">bool FatFile::seekEnd </td>
  2455. <td>(</td>
  2456. <td class="paramtype">int32_t&#160;</td>
  2457. <td class="paramname"><em>offset</em> = <code>0</code></td><td>)</td>
  2458. <td></td>
  2459. </tr>
  2460. </table>
  2461. </td>
  2462. <td class="mlabels-right">
  2463. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  2464. </tr>
  2465. </table>
  2466. </div><div class="memdoc">
  2467. <p>Set the files position to end-of-file + <em>offset</em>. See <a class="el" href="class_fat_file.html#ab067190d25733ed7e697d9890f61fd7a">seekSet()</a>. Can't be used for directory files since file size is not defined. </p><dl class="params"><dt>Parameters</dt><dd>
  2468. <table class="params">
  2469. <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>The new position in bytes from end-of-file. </td></tr>
  2470. </table>
  2471. </dd>
  2472. </dl>
  2473. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  2474. </div>
  2475. </div>
  2476. <a class="anchor" id="ab067190d25733ed7e697d9890f61fd7a"></a>
  2477. <div class="memitem">
  2478. <div class="memproto">
  2479. <table class="memname">
  2480. <tr>
  2481. <td class="memname">bool FatFile::seekSet </td>
  2482. <td>(</td>
  2483. <td class="paramtype">uint32_t&#160;</td>
  2484. <td class="paramname"><em>pos</em></td><td>)</td>
  2485. <td></td>
  2486. </tr>
  2487. </table>
  2488. </div><div class="memdoc">
  2489. <p>Sets a file's position.</p>
  2490. <dl class="params"><dt>Parameters</dt><dd>
  2491. <table class="params">
  2492. <tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>The new position in bytes from the beginning of the file.</td></tr>
  2493. </table>
  2494. </dd>
  2495. </dl>
  2496. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2497. </div>
  2498. </div>
  2499. <a class="anchor" id="a360ef9c05e677271bed6c0a4d663634c"></a>
  2500. <div class="memitem">
  2501. <div class="memproto">
  2502. <table class="mlabels">
  2503. <tr>
  2504. <td class="mlabels-left">
  2505. <table class="memname">
  2506. <tr>
  2507. <td class="memname">static bool FatFile::setCwd </td>
  2508. <td>(</td>
  2509. <td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> *&#160;</td>
  2510. <td class="paramname"><em>dir</em></td><td>)</td>
  2511. <td></td>
  2512. </tr>
  2513. </table>
  2514. </td>
  2515. <td class="mlabels-right">
  2516. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
  2517. </tr>
  2518. </table>
  2519. </div><div class="memdoc">
  2520. <p>Set the current working directory.</p>
  2521. <dl class="params"><dt>Parameters</dt><dd>
  2522. <table class="params">
  2523. <tr><td class="paramdir">[in]</td><td class="paramname">dir</td><td>New current working directory.</td></tr>
  2524. </table>
  2525. </dd>
  2526. </dl>
  2527. <dl class="section return"><dt>Returns</dt><dd>true for success else false. </dd></dl>
  2528. </div>
  2529. </div>
  2530. <a class="anchor" id="acf264de4e3ca36c5e8a39e56173c9044"></a>
  2531. <div class="memitem">
  2532. <div class="memproto">
  2533. <table class="memname">
  2534. <tr>
  2535. <td class="memname">void FatFile::setpos </td>
  2536. <td>(</td>
  2537. <td class="paramtype"><a class="el" href="struct_fat_pos__t.html">FatPos_t</a> *&#160;</td>
  2538. <td class="paramname"><em>pos</em></td><td>)</td>
  2539. <td></td>
  2540. </tr>
  2541. </table>
  2542. </div><div class="memdoc">
  2543. <p>set position for streams </p><dl class="params"><dt>Parameters</dt><dd>
  2544. <table class="params">
  2545. <tr><td class="paramdir">[out]</td><td class="paramname">pos</td><td>struct with value for new position </td></tr>
  2546. </table>
  2547. </dd>
  2548. </dl>
  2549. </div>
  2550. </div>
  2551. <a class="anchor" id="a67f3dc4896c542d695e11aac927f585e"></a>
  2552. <div class="memitem">
  2553. <div class="memproto">
  2554. <table class="memname">
  2555. <tr>
  2556. <td class="memname">bool FatFile::sync </td>
  2557. <td>(</td>
  2558. <td class="paramname"></td><td>)</td>
  2559. <td></td>
  2560. </tr>
  2561. </table>
  2562. </div><div class="memdoc">
  2563. <p>The <a class="el" href="class_fat_file.html#a67f3dc4896c542d695e11aac927f585e">sync()</a> call causes all modified data and directory fields to be written to the storage device.</p>
  2564. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2565. </div>
  2566. </div>
  2567. <a class="anchor" id="aa53a8d1d2467ad9af7d61cbf8ee85243"></a>
  2568. <div class="memitem">
  2569. <div class="memproto">
  2570. <table class="memname">
  2571. <tr>
  2572. <td class="memname">bool FatFile::timestamp </td>
  2573. <td>(</td>
  2574. <td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> *&#160;</td>
  2575. <td class="paramname"><em>file</em></td><td>)</td>
  2576. <td></td>
  2577. </tr>
  2578. </table>
  2579. </div><div class="memdoc">
  2580. <p>Copy a file's timestamps</p>
  2581. <dl class="params"><dt>Parameters</dt><dd>
  2582. <table class="params">
  2583. <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td><a class="el" href="class_file.html" title="Arduino SD.h style File API. ">File</a> to copy timestamps from.</td></tr>
  2584. </table>
  2585. </dd>
  2586. </dl>
  2587. <dl class="section note"><dt>Note</dt><dd>Modify and access timestamps may be overwritten if a date time callback function has been set by <a class="el" href="class_fat_file.html#a29a623f50df057e8b49045ba6611ec2b">dateTimeCallback()</a>.</dd></dl>
  2588. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2589. </div>
  2590. </div>
  2591. <a class="anchor" id="a56dabdf73833b7e961c4530eb8e16d23"></a>
  2592. <div class="memitem">
  2593. <div class="memproto">
  2594. <table class="memname">
  2595. <tr>
  2596. <td class="memname">bool FatFile::timestamp </td>
  2597. <td>(</td>
  2598. <td class="paramtype">uint8_t&#160;</td>
  2599. <td class="paramname"><em>flags</em>, </td>
  2600. </tr>
  2601. <tr>
  2602. <td class="paramkey"></td>
  2603. <td></td>
  2604. <td class="paramtype">uint16_t&#160;</td>
  2605. <td class="paramname"><em>year</em>, </td>
  2606. </tr>
  2607. <tr>
  2608. <td class="paramkey"></td>
  2609. <td></td>
  2610. <td class="paramtype">uint8_t&#160;</td>
  2611. <td class="paramname"><em>month</em>, </td>
  2612. </tr>
  2613. <tr>
  2614. <td class="paramkey"></td>
  2615. <td></td>
  2616. <td class="paramtype">uint8_t&#160;</td>
  2617. <td class="paramname"><em>day</em>, </td>
  2618. </tr>
  2619. <tr>
  2620. <td class="paramkey"></td>
  2621. <td></td>
  2622. <td class="paramtype">uint8_t&#160;</td>
  2623. <td class="paramname"><em>hour</em>, </td>
  2624. </tr>
  2625. <tr>
  2626. <td class="paramkey"></td>
  2627. <td></td>
  2628. <td class="paramtype">uint8_t&#160;</td>
  2629. <td class="paramname"><em>minute</em>, </td>
  2630. </tr>
  2631. <tr>
  2632. <td class="paramkey"></td>
  2633. <td></td>
  2634. <td class="paramtype">uint8_t&#160;</td>
  2635. <td class="paramname"><em>second</em>&#160;</td>
  2636. </tr>
  2637. <tr>
  2638. <td></td>
  2639. <td>)</td>
  2640. <td></td><td></td>
  2641. </tr>
  2642. </table>
  2643. </div><div class="memdoc">
  2644. <p>Set a file's timestamps in its directory entry.</p>
  2645. <dl class="params"><dt>Parameters</dt><dd>
  2646. <table class="params">
  2647. <tr><td class="paramdir">[in]</td><td class="paramname">flags</td><td>Values for <em>flags</em> are constructed by a bitwise-inclusive OR of flags from the following list</td></tr>
  2648. </table>
  2649. </dd>
  2650. </dl>
  2651. <p>T_ACCESS - Set the file's last access date.</p>
  2652. <p>T_CREATE - Set the file's creation date and time.</p>
  2653. <p>T_WRITE - Set the file's last write/modification date and time.</p>
  2654. <dl class="params"><dt>Parameters</dt><dd>
  2655. <table class="params">
  2656. <tr><td class="paramdir">[in]</td><td class="paramname">year</td><td>Valid range 1980 - 2107 inclusive.</td></tr>
  2657. <tr><td class="paramdir">[in]</td><td class="paramname">month</td><td>Valid range 1 - 12 inclusive.</td></tr>
  2658. <tr><td class="paramdir">[in]</td><td class="paramname">day</td><td>Valid range 1 - 31 inclusive.</td></tr>
  2659. <tr><td class="paramdir">[in]</td><td class="paramname">hour</td><td>Valid range 0 - 23 inclusive.</td></tr>
  2660. <tr><td class="paramdir">[in]</td><td class="paramname">minute</td><td>Valid range 0 - 59 inclusive.</td></tr>
  2661. <tr><td class="paramdir">[in]</td><td class="paramname">second</td><td>Valid range 0 - 59 inclusive</td></tr>
  2662. </table>
  2663. </dd>
  2664. </dl>
  2665. <dl class="section note"><dt>Note</dt><dd>It is possible to set an invalid date since there is no check for the number of days in a month.</dd>
  2666. <dd>
  2667. Modify and access timestamps may be overwritten if a date time callback function has been set by <a class="el" href="class_fat_file.html#a29a623f50df057e8b49045ba6611ec2b">dateTimeCallback()</a>.</dd></dl>
  2668. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2669. </div>
  2670. </div>
  2671. <a class="anchor" id="aa6e663098a578635d37d92e82d18d616"></a>
  2672. <div class="memitem">
  2673. <div class="memproto">
  2674. <table class="memname">
  2675. <tr>
  2676. <td class="memname">bool FatFile::truncate </td>
  2677. <td>(</td>
  2678. <td class="paramtype">uint32_t&#160;</td>
  2679. <td class="paramname"><em>length</em></td><td>)</td>
  2680. <td></td>
  2681. </tr>
  2682. </table>
  2683. </div><div class="memdoc">
  2684. <p>Truncate a file to a specified length. The current file position will be maintained if it is less than or equal to <em>length</em> otherwise it will be set to end of file.</p>
  2685. <dl class="params"><dt>Parameters</dt><dd>
  2686. <table class="params">
  2687. <tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The desired length for the file.</td></tr>
  2688. </table>
  2689. </dd>
  2690. </dl>
  2691. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  2692. </div>
  2693. </div>
  2694. <a class="anchor" id="a3c64bd8a9abb9a6461d4addb405614df"></a>
  2695. <div class="memitem">
  2696. <div class="memproto">
  2697. <table class="mlabels">
  2698. <tr>
  2699. <td class="mlabels-left">
  2700. <table class="memname">
  2701. <tr>
  2702. <td class="memname"><a class="el" href="class_fat_volume.html">FatVolume</a>* FatFile::volume </td>
  2703. <td>(</td>
  2704. <td class="paramname"></td><td>)</td>
  2705. <td> const</td>
  2706. </tr>
  2707. </table>
  2708. </td>
  2709. <td class="mlabels-right">
  2710. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  2711. </tr>
  2712. </table>
  2713. </div><div class="memdoc">
  2714. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_fat_volume.html" title="Access FAT16 and FAT32 volumes on raw file devices. ">FatVolume</a> that contains this file. </dd></dl>
  2715. </div>
  2716. </div>
  2717. <a class="anchor" id="aa4a5b81161994cea07938702cdfce49f"></a>
  2718. <div class="memitem">
  2719. <div class="memproto">
  2720. <table class="mlabels">
  2721. <tr>
  2722. <td class="mlabels-left">
  2723. <table class="memname">
  2724. <tr>
  2725. <td class="memname">int FatFile::write </td>
  2726. <td>(</td>
  2727. <td class="paramtype">const char *&#160;</td>
  2728. <td class="paramname"><em>str</em></td><td>)</td>
  2729. <td></td>
  2730. </tr>
  2731. </table>
  2732. </td>
  2733. <td class="mlabels-right">
  2734. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  2735. </tr>
  2736. </table>
  2737. </div><div class="memdoc">
  2738. <p>Write a string to a file. Used by the Arduino Print class. </p><dl class="params"><dt>Parameters</dt><dd>
  2739. <table class="params">
  2740. <tr><td class="paramdir">[in]</td><td class="paramname">str</td><td>Pointer to the string. Use getWriteError to check for errors. </td></tr>
  2741. </table>
  2742. </dd>
  2743. </dl>
  2744. <dl class="section return"><dt>Returns</dt><dd>count of characters written for success or -1 for failure. </dd></dl>
  2745. </div>
  2746. </div>
  2747. <a class="anchor" id="a5524bd9f3b8f54ee163e391cba618186"></a>
  2748. <div class="memitem">
  2749. <div class="memproto">
  2750. <table class="mlabels">
  2751. <tr>
  2752. <td class="mlabels-left">
  2753. <table class="memname">
  2754. <tr>
  2755. <td class="memname">int FatFile::write </td>
  2756. <td>(</td>
  2757. <td class="paramtype">uint8_t&#160;</td>
  2758. <td class="paramname"><em>b</em></td><td>)</td>
  2759. <td></td>
  2760. </tr>
  2761. </table>
  2762. </td>
  2763. <td class="mlabels-right">
  2764. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  2765. </tr>
  2766. </table>
  2767. </div><div class="memdoc">
  2768. <p>Write a single byte. </p><dl class="params"><dt>Parameters</dt><dd>
  2769. <table class="params">
  2770. <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>The byte to be written. </td></tr>
  2771. </table>
  2772. </dd>
  2773. </dl>
  2774. <dl class="section return"><dt>Returns</dt><dd>+1 for success or -1 for failure. </dd></dl>
  2775. </div>
  2776. </div>
  2777. <a class="anchor" id="a0ab9df44a9ee4b6eb0a78f15f1e30004"></a>
  2778. <div class="memitem">
  2779. <div class="memproto">
  2780. <table class="memname">
  2781. <tr>
  2782. <td class="memname">int FatFile::write </td>
  2783. <td>(</td>
  2784. <td class="paramtype">const void *&#160;</td>
  2785. <td class="paramname"><em>buf</em>, </td>
  2786. </tr>
  2787. <tr>
  2788. <td class="paramkey"></td>
  2789. <td></td>
  2790. <td class="paramtype">size_t&#160;</td>
  2791. <td class="paramname"><em>nbyte</em>&#160;</td>
  2792. </tr>
  2793. <tr>
  2794. <td></td>
  2795. <td>)</td>
  2796. <td></td><td></td>
  2797. </tr>
  2798. </table>
  2799. </div><div class="memdoc">
  2800. <p>Write data to an open file.</p>
  2801. <dl class="section note"><dt>Note</dt><dd>Data is moved to the cache but may not be written to the storage device until <a class="el" href="class_fat_file.html#a67f3dc4896c542d695e11aac927f585e">sync()</a> is called.</dd></dl>
  2802. <dl class="params"><dt>Parameters</dt><dd>
  2803. <table class="params">
  2804. <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Pointer to the location of the data to be written.</td></tr>
  2805. <tr><td class="paramdir">[in]</td><td class="paramname">nbyte</td><td>Number of bytes to write.</td></tr>
  2806. </table>
  2807. </dd>
  2808. </dl>
  2809. <dl class="section return"><dt>Returns</dt><dd>For success <a class="el" href="class_fat_file.html#aa4a5b81161994cea07938702cdfce49f">write()</a> returns the number of bytes written, always <em>nbyte</em>. If an error occurs, <a class="el" href="class_fat_file.html#aa4a5b81161994cea07938702cdfce49f">write()</a> returns -1. Possible errors include <a class="el" href="class_fat_file.html#aa4a5b81161994cea07938702cdfce49f">write()</a> is called before a file has been opened, write is called for a read-only file, device is full, a corrupt file system or an I/O error. </dd></dl>
  2810. </div>
  2811. </div>
  2812. <hr/>The documentation for this class was generated from the following files:<ul>
  2813. <li>Arduino/libraries/SdFat/src/FatLib/<a class="el" href="_fat_file_8h.html">FatFile.h</a></li>
  2814. <li>Arduino/libraries/SdFat/src/FatLib/FatFile.cpp</li>
  2815. <li>Arduino/libraries/SdFat/src/FatLib/FatFileLFN.cpp</li>
  2816. <li>Arduino/libraries/SdFat/src/FatLib/FatFilePrint.cpp</li>
  2817. <li>Arduino/libraries/SdFat/src/FatLib/FatFileSFN.cpp</li>
  2818. </ul>
  2819. </div><!-- contents -->
  2820. <!-- start footer part -->
  2821. <hr class="footer"/><address class="footer"><small>
  2822. Generated on Fri Feb 12 2016 13:43:49 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  2823. <img class="footer" src="doxygen.png" alt="doxygen"/>
  2824. </a> 1.8.10
  2825. </small></address>
  2826. </body>
  2827. </html>