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.

2450 lines
110KB

  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.14"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>SdFat: FsFile Class Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">SdFat
  25. </div>
  26. </td>
  27. </tr>
  28. </tbody>
  29. </table>
  30. </div>
  31. <!-- end header part -->
  32. <!-- Generated by Doxygen 1.8.14 -->
  33. <script type="text/javascript">
  34. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. /* @license-end */
  37. </script>
  38. <script type="text/javascript" src="menudata.js"></script>
  39. <script type="text/javascript" src="menu.js"></script>
  40. <script type="text/javascript">
  41. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  42. $(function() {
  43. initMenu('',true,false,'search.php','Search');
  44. $(document).ready(function() { init_search(); });
  45. });
  46. /* @license-end */</script>
  47. <div id="main-nav"></div>
  48. <!-- window showing the filter options -->
  49. <div id="MSearchSelectWindow"
  50. onmouseover="return searchBox.OnSearchSelectShow()"
  51. onmouseout="return searchBox.OnSearchSelectHide()"
  52. onkeydown="return searchBox.OnSearchSelectKey(event)">
  53. </div>
  54. <!-- iframe showing the search results (closed by default) -->
  55. <div id="MSearchResultsWindow">
  56. <iframe src="javascript:void(0)" frameborder="0"
  57. name="MSearchResults" id="MSearchResults">
  58. </iframe>
  59. </div>
  60. </div><!-- top -->
  61. <div class="header">
  62. <div class="summary">
  63. <a href="#pub-methods">Public Member Functions</a> &#124;
  64. <a href="class_fs_file-members.html">List of all members</a> </div>
  65. <div class="headertitle">
  66. <div class="title">FsFile Class Reference</div> </div>
  67. </div><!--header-->
  68. <div class="contents">
  69. <p><a class="el" href="class_fs_base_file.html" title="FsBaseFile class. ">FsBaseFile</a> file with Arduino Stream.
  70. <a href="class_fs_file.html#details">More...</a></p>
  71. <p><code>#include &lt;FsFile.h&gt;</code></p>
  72. <div class="dynheader">
  73. Inheritance diagram for FsFile:</div>
  74. <div class="dyncontent">
  75. <div class="center"><img src="class_fs_file__inherit__graph.png" border="0" usemap="#_fs_file_inherit__map" alt="Inheritance graph"/></div>
  76. <map name="_fs_file_inherit__map" id="_fs_file_inherit__map">
  77. <area shape="rect" id="node2" href="class_stream_file.html" title="StreamFile\&lt; FsBaseFile,\l uint64_t \&gt;" alt="" coords="11,80,177,121"/>
  78. <area shape="rect" id="node4" href="class_fs_base_file.html" title="FsBaseFile class. " alt="" coords="103,5,191,32"/>
  79. </map>
  80. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  81. <div class="dynheader">
  82. Collaboration diagram for FsFile:</div>
  83. <div class="dyncontent">
  84. <div class="center"><img src="class_fs_file__coll__graph.png" border="0" usemap="#_fs_file_coll__map" alt="Collaboration graph"/></div>
  85. <map name="_fs_file_coll__map" id="_fs_file_coll__map">
  86. <area shape="rect" id="node2" href="class_stream_file.html" title="StreamFile\&lt; FsBaseFile,\l uint64_t \&gt;" alt="" coords="11,80,177,121"/>
  87. <area shape="rect" id="node4" href="class_fs_base_file.html" title="FsBaseFile class. " alt="" coords="103,5,191,32"/>
  88. </map>
  89. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  90. <table class="memberdecls">
  91. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  92. Public Member Functions</h2></td></tr>
  93. <tr class="memitem:a0112cc39b64aac6f1ec47741397a7582"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_file.html#a0112cc39b64aac6f1ec47741397a7582">available</a> ()</td></tr>
  94. <tr class="separator:a0112cc39b64aac6f1ec47741397a7582"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. <tr class="memitem:a936fc1e3fb13a6ae1352d027bf0a70f7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a936fc1e3fb13a6ae1352d027bf0a70f7">clearWriteError</a> ()</td></tr>
  96. <tr class="separator:a936fc1e3fb13a6ae1352d027bf0a70f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. <tr class="memitem:aa669c695a839e68e417fb15eebe3de13"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#aa669c695a839e68e417fb15eebe3de13">close</a> ()</td></tr>
  98. <tr class="separator:aa669c695a839e68e417fb15eebe3de13"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:a856bccf55a40ebbea27072dcfea06191"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a856bccf55a40ebbea27072dcfea06191">curPosition</a> ()</td></tr>
  100. <tr class="separator:a856bccf55a40ebbea27072dcfea06191"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:ac05660570595552c72164a61001899d5"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#ac05660570595552c72164a61001899d5">dirIndex</a> ()</td></tr>
  102. <tr class="separator:ac05660570595552c72164a61001899d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  103. <tr class="memitem:a76aea9766ffeae5454381a0704e62505"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a76aea9766ffeae5454381a0704e62505">exists</a> (const char *path)</td></tr>
  104. <tr class="separator:a76aea9766ffeae5454381a0704e62505"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="memitem:adda345ec539688e40e279a4e3020d208"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#adda345ec539688e40e279a4e3020d208">fgetpos</a> (fspos_t *pos)</td></tr>
  106. <tr class="separator:adda345ec539688e40e279a4e3020d208"><td class="memSeparator" colspan="2">&#160;</td></tr>
  107. <tr class="memitem:ab6b6b97a6382a763d6de882252412727"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#ab6b6b97a6382a763d6de882252412727">fgets</a> (char *str, int num, char *delim=<a class="el" href="_sys_call_8h.html#ab979d9d4b4923f7c54d6caa6e1a61936">nullptr</a>)</td></tr>
  108. <tr class="separator:ab6b6b97a6382a763d6de882252412727"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. <tr class="memitem:aef21ae3af496d80f214918bb40b5b3ba"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#aef21ae3af496d80f214918bb40b5b3ba">fileSize</a> ()</td></tr>
  110. <tr class="separator:aef21ae3af496d80f214918bb40b5b3ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. <tr class="memitem:a32f813e659414892a58aa5157fe14f82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_file.html#a32f813e659414892a58aa5157fe14f82">flush</a> ()</td></tr>
  112. <tr class="separator:a32f813e659414892a58aa5157fe14f82"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. <tr class="memitem:a4bc085bc1ef0569f4ca7f14fff3e5678"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a4bc085bc1ef0569f4ca7f14fff3e5678">fsetpos</a> (const fspos_t *pos)</td></tr>
  114. <tr class="separator:a4bc085bc1ef0569f4ca7f14fff3e5678"><td class="memSeparator" colspan="2">&#160;</td></tr>
  115. <tr class="memitem:a7553d4aeb68fe8d3f1b61a16c8005e34"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a7553d4aeb68fe8d3f1b61a16c8005e34">getError</a> ()</td></tr>
  116. <tr class="separator:a7553d4aeb68fe8d3f1b61a16c8005e34"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="memitem:ad2099dbe6bb8f61e1bf933d8e97b2d86"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#ad2099dbe6bb8f61e1bf933d8e97b2d86">getName</a> (char *<a class="el" href="class_stream_file.html#a8792c863080576eb65ce6cacbe1dd931">name</a>, size_t len)</td></tr>
  118. <tr class="separator:ad2099dbe6bb8f61e1bf933d8e97b2d86"><td class="memSeparator" colspan="2">&#160;</td></tr>
  119. <tr class="memitem:ab5525bef93bab61569225374d475f2cb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#ab5525bef93bab61569225374d475f2cb">getWriteError</a> ()</td></tr>
  120. <tr class="separator:ab5525bef93bab61569225374d475f2cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  121. <tr class="memitem:ae93db43779d54734855005116244f6aa"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#ae93db43779d54734855005116244f6aa">isDir</a> ()</td></tr>
  122. <tr class="separator:ae93db43779d54734855005116244f6aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:a586ad44055eca4c1b2b457299b829d44"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_file.html#a586ad44055eca4c1b2b457299b829d44">isDirectory</a> ()</td></tr>
  124. <tr class="separator:a586ad44055eca4c1b2b457299b829d44"><td class="memSeparator" colspan="2">&#160;</td></tr>
  125. <tr class="memitem:a00e76b229cbb5098e1eb88e64a41dbfb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a00e76b229cbb5098e1eb88e64a41dbfb">isHidden</a> ()</td></tr>
  126. <tr class="separator:a00e76b229cbb5098e1eb88e64a41dbfb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  127. <tr class="memitem:a707007ff19ac5e4eb94cd0b26c542e0e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a707007ff19ac5e4eb94cd0b26c542e0e">isOpen</a> ()</td></tr>
  128. <tr class="separator:a707007ff19ac5e4eb94cd0b26c542e0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <tr class="memitem:a3140f64c85218c4b2f12f711483cd4c6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a3140f64c85218c4b2f12f711483cd4c6">isSubDir</a> ()</td></tr>
  130. <tr class="separator:a3140f64c85218c4b2f12f711483cd4c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  131. <tr class="memitem:aecbc336b952eebebfdfcf917863183ee"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#aecbc336b952eebebfdfcf917863183ee">ls</a> (<a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *pr)</td></tr>
  132. <tr class="separator:aecbc336b952eebebfdfcf917863183ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
  133. <tr class="memitem:a6a254df9866966f7f97478e916fe6a7f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a6a254df9866966f7f97478e916fe6a7f">ls</a> (<a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *pr, uint8_t flags)</td></tr>
  134. <tr class="separator:a6a254df9866966f7f97478e916fe6a7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. <tr class="memitem:a8b7aa7f2c63882e483336dfe12ef6800"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a8b7aa7f2c63882e483336dfe12ef6800">mkdir</a> (<a class="el" href="class_fs_base_file.html">FsBaseFile</a> *dir, const char *path, bool pFlag=true)</td></tr>
  136. <tr class="separator:a8b7aa7f2c63882e483336dfe12ef6800"><td class="memSeparator" colspan="2">&#160;</td></tr>
  137. <tr class="memitem:a8792c863080576eb65ce6cacbe1dd931"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_file.html#a8792c863080576eb65ce6cacbe1dd931">name</a> () const</td></tr>
  138. <tr class="separator:a8792c863080576eb65ce6cacbe1dd931"><td class="memSeparator" colspan="2">&#160;</td></tr>
  139. <tr class="memitem:aa767859d4a4b4716ebbc4ea42a6d74df"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#aa767859d4a4b4716ebbc4ea42a6d74df">open</a> (<a class="el" href="class_fs_base_file.html">FsBaseFile</a> *dir, const char *path, oflag_t oflag=O_RDONLY)</td></tr>
  140. <tr class="separator:aa767859d4a4b4716ebbc4ea42a6d74df"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <tr class="memitem:ac4edea1afb935119ecaf39607016c3cc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#ac4edea1afb935119ecaf39607016c3cc">open</a> (<a class="el" href="class_fs_base_file.html">FsBaseFile</a> *dir, uint32_t index, oflag_t oflag)</td></tr>
  142. <tr class="separator:ac4edea1afb935119ecaf39607016c3cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  143. <tr class="memitem:a9786eb47f5d001e89ff291c271517547"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a9786eb47f5d001e89ff291c271517547">open</a> (<a class="el" href="class_fs_volume.html">FsVolume</a> *vol, const char *path, oflag_t oflag)</td></tr>
  144. <tr class="separator:a9786eb47f5d001e89ff291c271517547"><td class="memSeparator" colspan="2">&#160;</td></tr>
  145. <tr class="memitem:af44f0decd9b11dd45996e81f46e2cdee"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#af44f0decd9b11dd45996e81f46e2cdee">open</a> (const char *path, oflag_t oflag=O_RDONLY)</td></tr>
  146. <tr class="separator:af44f0decd9b11dd45996e81f46e2cdee"><td class="memSeparator" colspan="2">&#160;</td></tr>
  147. <tr class="memitem:acb9b1075f4db76fa7e0521c9aff9c3df"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#acb9b1075f4db76fa7e0521c9aff9c3df">openNext</a> (<a class="el" href="class_fs_base_file.html">FsBaseFile</a> *dir, oflag_t oflag=O_RDONLY)</td></tr>
  148. <tr class="separator:acb9b1075f4db76fa7e0521c9aff9c3df"><td class="memSeparator" colspan="2">&#160;</td></tr>
  149. <tr class="memitem:ab2f85961e3831d0d654da862becb7433"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_fs_file.html">FsFile</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ab2f85961e3831d0d654da862becb7433">openNextFile</a> (oflag_t oflag=O_RDONLY)</td></tr>
  150. <tr class="separator:ab2f85961e3831d0d654da862becb7433"><td class="memSeparator" colspan="2">&#160;</td></tr>
  151. <tr class="memitem:a3ad633f3efc2701a3a89e776436b14e1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a3ad633f3efc2701a3a89e776436b14e1">operator bool</a> ()</td></tr>
  152. <tr class="separator:a3ad633f3efc2701a3a89e776436b14e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  153. <tr class="memitem:af0da96e502485133ca0cff27fa130082"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_file.html#af0da96e502485133ca0cff27fa130082">peek</a> ()</td></tr>
  154. <tr class="separator:af0da96e502485133ca0cff27fa130082"><td class="memSeparator" colspan="2">&#160;</td></tr>
  155. <tr class="memitem:a18a04d1e68a0c1e3e38e5712cd9bbc03"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_file.html#a18a04d1e68a0c1e3e38e5712cd9bbc03">position</a> ()</td></tr>
  156. <tr class="separator:a18a04d1e68a0c1e3e38e5712cd9bbc03"><td class="memSeparator" colspan="2">&#160;</td></tr>
  157. <tr class="memitem:acbc037f9f07c57235bb8b30af5a53ac2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#acbc037f9f07c57235bb8b30af5a53ac2">preAllocate</a> (uint64_t length)</td></tr>
  158. <tr class="separator:acbc037f9f07c57235bb8b30af5a53ac2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  159. <tr class="memitem:a264ba61530aee50dbe9659d41dd2c1d6"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a264ba61530aee50dbe9659d41dd2c1d6">printAccessDateTime</a> (<a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *pr)</td></tr>
  160. <tr class="separator:a264ba61530aee50dbe9659d41dd2c1d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  161. <tr class="memitem:a3f75ac7eb6643afcabae28e8c93479c8"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a3f75ac7eb6643afcabae28e8c93479c8">printCreateDateTime</a> (<a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *pr)</td></tr>
  162. <tr class="separator:a3f75ac7eb6643afcabae28e8c93479c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  163. <tr class="memitem:a911ae825e67d7e6ade4a672595e060d6"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a911ae825e67d7e6ade4a672595e060d6">printField</a> (double value, char term, uint8_t prec=2)</td></tr>
  164. <tr class="separator:a911ae825e67d7e6ade4a672595e060d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  165. <tr class="memitem:a5dd2738efe2e550f56037536bc252f13"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a5dd2738efe2e550f56037536bc252f13">printField</a> (float value, char term, uint8_t prec=2)</td></tr>
  166. <tr class="separator:a5dd2738efe2e550f56037536bc252f13"><td class="memSeparator" colspan="2">&#160;</td></tr>
  167. <tr class="memitem:a45639312b8c5aa9ceddb19e654e902b4"><td class="memTemplParams" colspan="2">template&lt;typename Type &gt; </td></tr>
  168. <tr class="memitem:a45639312b8c5aa9ceddb19e654e902b4"><td class="memTemplItemLeft" align="right" valign="top">size_t&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a45639312b8c5aa9ceddb19e654e902b4">printField</a> (Type value, char term)</td></tr>
  169. <tr class="separator:a45639312b8c5aa9ceddb19e654e902b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  170. <tr class="memitem:a6760471e3c445f66b94f3f0e96fdfe10"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a6760471e3c445f66b94f3f0e96fdfe10">printFileSize</a> (<a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *pr)</td></tr>
  171. <tr class="separator:a6760471e3c445f66b94f3f0e96fdfe10"><td class="memSeparator" colspan="2">&#160;</td></tr>
  172. <tr class="memitem:a0f2f813496fa156f9808a5d33c2d8746"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a0f2f813496fa156f9808a5d33c2d8746">printModifyDateTime</a> (<a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *pr)</td></tr>
  173. <tr class="separator:a0f2f813496fa156f9808a5d33c2d8746"><td class="memSeparator" colspan="2">&#160;</td></tr>
  174. <tr class="memitem:a178a1cbe2bce19758a55bd00fa262732"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a178a1cbe2bce19758a55bd00fa262732">printName</a> (<a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *pr)</td></tr>
  175. <tr class="separator:a178a1cbe2bce19758a55bd00fa262732"><td class="memSeparator" colspan="2">&#160;</td></tr>
  176. <tr class="memitem:a249a5d428f303e2a8e7c3ae476e74829"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_file.html#a249a5d428f303e2a8e7c3ae476e74829">read</a> ()</td></tr>
  177. <tr class="separator:a249a5d428f303e2a8e7c3ae476e74829"><td class="memSeparator" colspan="2">&#160;</td></tr>
  178. <tr class="memitem:ae8d8cb4cceda9d56e8dae692d04a46e6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#ae8d8cb4cceda9d56e8dae692d04a46e6">read</a> (void *buf, size_t count)</td></tr>
  179. <tr class="separator:ae8d8cb4cceda9d56e8dae692d04a46e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  180. <tr class="memitem:a8d21f9df86e846e34c3bb11cf7db21bc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a8d21f9df86e846e34c3bb11cf7db21bc">remove</a> ()</td></tr>
  181. <tr class="separator:a8d21f9df86e846e34c3bb11cf7db21bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  182. <tr class="memitem:a64feff69c4f09e56247c7f9dc7c74f34"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a64feff69c4f09e56247c7f9dc7c74f34">remove</a> (const char *path)</td></tr>
  183. <tr class="separator:a64feff69c4f09e56247c7f9dc7c74f34"><td class="memSeparator" colspan="2">&#160;</td></tr>
  184. <tr class="memitem:af532d87177e86995a053503eb9152115"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#af532d87177e86995a053503eb9152115">rename</a> (const char *newPath)</td></tr>
  185. <tr class="separator:af532d87177e86995a053503eb9152115"><td class="memSeparator" colspan="2">&#160;</td></tr>
  186. <tr class="memitem:a4e4347f6e89bf0b487824dbdc5b82068"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a4e4347f6e89bf0b487824dbdc5b82068">rename</a> (<a class="el" href="class_fs_base_file.html">FsBaseFile</a> *dirFile, const char *newPath)</td></tr>
  187. <tr class="separator:a4e4347f6e89bf0b487824dbdc5b82068"><td class="memSeparator" colspan="2">&#160;</td></tr>
  188. <tr class="memitem:a22f8ef845d610493ebe314e19ddda561"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a22f8ef845d610493ebe314e19ddda561">rewind</a> ()</td></tr>
  189. <tr class="separator:a22f8ef845d610493ebe314e19ddda561"><td class="memSeparator" colspan="2">&#160;</td></tr>
  190. <tr class="memitem:a91e8cfbde27d6879b4f51d2ceb2a9f06"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_file.html#a91e8cfbde27d6879b4f51d2ceb2a9f06">rewindDirectory</a> ()</td></tr>
  191. <tr class="separator:a91e8cfbde27d6879b4f51d2ceb2a9f06"><td class="memSeparator" colspan="2">&#160;</td></tr>
  192. <tr class="memitem:ac47870fd89b0849cda33f2780918a286"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#ac47870fd89b0849cda33f2780918a286">rmdir</a> ()</td></tr>
  193. <tr class="separator:ac47870fd89b0849cda33f2780918a286"><td class="memSeparator" colspan="2">&#160;</td></tr>
  194. <tr class="memitem:a773ee6f661fc689a5187f51cb5498086"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_file.html#a773ee6f661fc689a5187f51cb5498086">seek</a> (uint64_t pos)</td></tr>
  195. <tr class="separator:a773ee6f661fc689a5187f51cb5498086"><td class="memSeparator" colspan="2">&#160;</td></tr>
  196. <tr class="memitem:a5fa242a4598eab5caa6efd4bdf62f5c0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a5fa242a4598eab5caa6efd4bdf62f5c0">seekCur</a> (int64_t offset)</td></tr>
  197. <tr class="separator:a5fa242a4598eab5caa6efd4bdf62f5c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  198. <tr class="memitem:ade9f9a9ac4d3e0a392a6cc45c9551767"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#ade9f9a9ac4d3e0a392a6cc45c9551767">seekEnd</a> (int64_t offset=0)</td></tr>
  199. <tr class="separator:ade9f9a9ac4d3e0a392a6cc45c9551767"><td class="memSeparator" colspan="2">&#160;</td></tr>
  200. <tr class="memitem:a460f7598c903b8a4b4fe868dacccb6dd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a460f7598c903b8a4b4fe868dacccb6dd">seekSet</a> (uint64_t pos)</td></tr>
  201. <tr class="separator:a460f7598c903b8a4b4fe868dacccb6dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  202. <tr class="memitem:a5813d451e7f7ba57a04d177caffc5a9f"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_file.html#a5813d451e7f7ba57a04d177caffc5a9f">size</a> ()</td></tr>
  203. <tr class="separator:a5813d451e7f7ba57a04d177caffc5a9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  204. <tr class="memitem:acf2d9261c5c1b1b022a0414cdfe0a17b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#acf2d9261c5c1b1b022a0414cdfe0a17b">sync</a> ()</td></tr>
  205. <tr class="separator:acf2d9261c5c1b1b022a0414cdfe0a17b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  206. <tr class="memitem:acea65e639feebaac01964af02a77d324"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#acea65e639feebaac01964af02a77d324">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>
  207. <tr class="separator:acea65e639feebaac01964af02a77d324"><td class="memSeparator" colspan="2">&#160;</td></tr>
  208. <tr class="memitem:a2a0bf00241df08a604f054512746986b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a2a0bf00241df08a604f054512746986b">truncate</a> ()</td></tr>
  209. <tr class="separator:a2a0bf00241df08a604f054512746986b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  210. <tr class="memitem:a47247cc54157ef79e0752f55ba01cf7e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#a47247cc54157ef79e0752f55ba01cf7e">truncate</a> (uint64_t length)</td></tr>
  211. <tr class="separator:a47247cc54157ef79e0752f55ba01cf7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  212. <tr class="memitem:a0695220134825199b39dee82f18ab1ec"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_file.html#a0695220134825199b39dee82f18ab1ec">write</a> (uint8_t b)</td></tr>
  213. <tr class="separator:a0695220134825199b39dee82f18ab1ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
  214. <tr class="memitem:a0ace3aaaf6d0fb673a43059c0664fab6"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_file.html#a0ace3aaaf6d0fb673a43059c0664fab6">write</a> (const uint8_t *buffer, size_t <a class="el" href="class_stream_file.html#a5813d451e7f7ba57a04d177caffc5a9f">size</a>)</td></tr>
  215. <tr class="separator:a0ace3aaaf6d0fb673a43059c0664fab6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  216. <tr class="memitem:aa763e83fea4889828effc3308f13113a"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_base_file.html#aa763e83fea4889828effc3308f13113a">write</a> (const void *buf, size_t count)</td></tr>
  217. <tr class="separator:aa763e83fea4889828effc3308f13113a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  218. </table>
  219. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  220. <div class="textblock"><p><a class="el" href="class_fs_base_file.html" title="FsBaseFile class. ">FsBaseFile</a> file with Arduino Stream. </p>
  221. </div><h2 class="groupheader">Member Function Documentation</h2>
  222. <a id="a0112cc39b64aac6f1ec47741397a7582"></a>
  223. <h2 class="memtitle"><span class="permalink"><a href="#a0112cc39b64aac6f1ec47741397a7582">&#9670;&nbsp;</a></span>available()</h2>
  224. <div class="memitem">
  225. <div class="memproto">
  226. <table class="mlabels">
  227. <tr>
  228. <td class="mlabels-left">
  229. <table class="memname">
  230. <tr>
  231. <td class="memname">int <a class="el" href="class_stream_file.html">StreamFile</a>&lt; <a class="el" href="class_fs_base_file.html">FsBaseFile</a> , uint64_t &gt;::available </td>
  232. <td>(</td>
  233. <td class="paramname"></td><td>)</td>
  234. <td></td>
  235. </tr>
  236. </table>
  237. </td>
  238. <td class="mlabels-right">
  239. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  240. </tr>
  241. </table>
  242. </div><div class="memdoc">
  243. <dl class="section return"><dt>Returns</dt><dd>number of bytes available from the current position to EOF or INT_MAX if more than INT_MAX bytes are available. </dd></dl>
  244. </div>
  245. </div>
  246. <a id="a936fc1e3fb13a6ae1352d027bf0a70f7"></a>
  247. <h2 class="memtitle"><span class="permalink"><a href="#a936fc1e3fb13a6ae1352d027bf0a70f7">&#9670;&nbsp;</a></span>clearWriteError()</h2>
  248. <div class="memitem">
  249. <div class="memproto">
  250. <table class="mlabels">
  251. <tr>
  252. <td class="mlabels-left">
  253. <table class="memname">
  254. <tr>
  255. <td class="memname">void FsBaseFile::clearWriteError </td>
  256. <td>(</td>
  257. <td class="paramname"></td><td>)</td>
  258. <td></td>
  259. </tr>
  260. </table>
  261. </td>
  262. <td class="mlabels-right">
  263. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  264. </tr>
  265. </table>
  266. </div><div class="memdoc">
  267. <p>Set writeError to zero </p>
  268. </div>
  269. </div>
  270. <a id="aa669c695a839e68e417fb15eebe3de13"></a>
  271. <h2 class="memtitle"><span class="permalink"><a href="#aa669c695a839e68e417fb15eebe3de13">&#9670;&nbsp;</a></span>close()</h2>
  272. <div class="memitem">
  273. <div class="memproto">
  274. <table class="mlabels">
  275. <tr>
  276. <td class="mlabels-left">
  277. <table class="memname">
  278. <tr>
  279. <td class="memname">bool FsBaseFile::close </td>
  280. <td>(</td>
  281. <td class="paramname"></td><td>)</td>
  282. <td></td>
  283. </tr>
  284. </table>
  285. </td>
  286. <td class="mlabels-right">
  287. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  288. </tr>
  289. </table>
  290. </div><div class="memdoc">
  291. <p>Close a file and force cached data and directory information to be written to the storage device.</p>
  292. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  293. </div>
  294. </div>
  295. <a id="a856bccf55a40ebbea27072dcfea06191"></a>
  296. <h2 class="memtitle"><span class="permalink"><a href="#a856bccf55a40ebbea27072dcfea06191">&#9670;&nbsp;</a></span>curPosition()</h2>
  297. <div class="memitem">
  298. <div class="memproto">
  299. <table class="mlabels">
  300. <tr>
  301. <td class="mlabels-left">
  302. <table class="memname">
  303. <tr>
  304. <td class="memname">uint64_t FsBaseFile::curPosition </td>
  305. <td>(</td>
  306. <td class="paramname"></td><td>)</td>
  307. <td></td>
  308. </tr>
  309. </table>
  310. </td>
  311. <td class="mlabels-right">
  312. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  313. </tr>
  314. </table>
  315. </div><div class="memdoc">
  316. <dl class="section return"><dt>Returns</dt><dd>The current position for a file or directory. </dd></dl>
  317. </div>
  318. </div>
  319. <a id="ac05660570595552c72164a61001899d5"></a>
  320. <h2 class="memtitle"><span class="permalink"><a href="#ac05660570595552c72164a61001899d5">&#9670;&nbsp;</a></span>dirIndex()</h2>
  321. <div class="memitem">
  322. <div class="memproto">
  323. <table class="mlabels">
  324. <tr>
  325. <td class="mlabels-left">
  326. <table class="memname">
  327. <tr>
  328. <td class="memname">uint32_t FsBaseFile::dirIndex </td>
  329. <td>(</td>
  330. <td class="paramname"></td><td>)</td>
  331. <td></td>
  332. </tr>
  333. </table>
  334. </td>
  335. <td class="mlabels-right">
  336. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  337. </tr>
  338. </table>
  339. </div><div class="memdoc">
  340. <dl class="section return"><dt>Returns</dt><dd>Directory entry index. </dd></dl>
  341. </div>
  342. </div>
  343. <a id="a76aea9766ffeae5454381a0704e62505"></a>
  344. <h2 class="memtitle"><span class="permalink"><a href="#a76aea9766ffeae5454381a0704e62505">&#9670;&nbsp;</a></span>exists()</h2>
  345. <div class="memitem">
  346. <div class="memproto">
  347. <table class="mlabels">
  348. <tr>
  349. <td class="mlabels-left">
  350. <table class="memname">
  351. <tr>
  352. <td class="memname">bool FsBaseFile::exists </td>
  353. <td>(</td>
  354. <td class="paramtype">const char *&#160;</td>
  355. <td class="paramname"><em>path</em></td><td>)</td>
  356. <td></td>
  357. </tr>
  358. </table>
  359. </td>
  360. <td class="mlabels-right">
  361. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  362. </tr>
  363. </table>
  364. </div><div class="memdoc">
  365. <p>Test for the existence of a file in a directory</p>
  366. <dl class="params"><dt>Parameters</dt><dd>
  367. <table class="params">
  368. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>Path of the file to be tested for.</td></tr>
  369. </table>
  370. </dd>
  371. </dl>
  372. <p>The calling instance must be an open directory file.</p>
  373. <p>dirFile.exists("TOFIND.TXT") searches for "TOFIND.TXT" in the directory dirFile.</p>
  374. <dl class="section return"><dt>Returns</dt><dd>true if the file exists else false. </dd></dl>
  375. </div>
  376. </div>
  377. <a id="adda345ec539688e40e279a4e3020d208"></a>
  378. <h2 class="memtitle"><span class="permalink"><a href="#adda345ec539688e40e279a4e3020d208">&#9670;&nbsp;</a></span>fgetpos()</h2>
  379. <div class="memitem">
  380. <div class="memproto">
  381. <table class="mlabels">
  382. <tr>
  383. <td class="mlabels-left">
  384. <table class="memname">
  385. <tr>
  386. <td class="memname">void FsBaseFile::fgetpos </td>
  387. <td>(</td>
  388. <td class="paramtype">fspos_t *&#160;</td>
  389. <td class="paramname"><em>pos</em></td><td>)</td>
  390. <td></td>
  391. </tr>
  392. </table>
  393. </td>
  394. <td class="mlabels-right">
  395. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  396. </tr>
  397. </table>
  398. </div><div class="memdoc">
  399. <p>get position for streams </p><dl class="params"><dt>Parameters</dt><dd>
  400. <table class="params">
  401. <tr><td class="paramdir">[out]</td><td class="paramname">pos</td><td>struct to receive position </td></tr>
  402. </table>
  403. </dd>
  404. </dl>
  405. </div>
  406. </div>
  407. <a id="ab6b6b97a6382a763d6de882252412727"></a>
  408. <h2 class="memtitle"><span class="permalink"><a href="#ab6b6b97a6382a763d6de882252412727">&#9670;&nbsp;</a></span>fgets()</h2>
  409. <div class="memitem">
  410. <div class="memproto">
  411. <table class="mlabels">
  412. <tr>
  413. <td class="mlabels-left">
  414. <table class="memname">
  415. <tr>
  416. <td class="memname">int FsBaseFile::fgets </td>
  417. <td>(</td>
  418. <td class="paramtype">char *&#160;</td>
  419. <td class="paramname"><em>str</em>, </td>
  420. </tr>
  421. <tr>
  422. <td class="paramkey"></td>
  423. <td></td>
  424. <td class="paramtype">int&#160;</td>
  425. <td class="paramname"><em>num</em>, </td>
  426. </tr>
  427. <tr>
  428. <td class="paramkey"></td>
  429. <td></td>
  430. <td class="paramtype">char *&#160;</td>
  431. <td class="paramname"><em>delim</em> = <code><a class="el" href="_sys_call_8h.html#ab979d9d4b4923f7c54d6caa6e1a61936">nullptr</a></code>&#160;</td>
  432. </tr>
  433. <tr>
  434. <td></td>
  435. <td>)</td>
  436. <td></td><td></td>
  437. </tr>
  438. </table>
  439. </td>
  440. <td class="mlabels-right">
  441. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  442. </tr>
  443. </table>
  444. </div><div class="memdoc">
  445. <p>Get a string from a file.</p>
  446. <p><a class="el" href="class_fs_base_file.html#ab6b6b97a6382a763d6de882252412727">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>
  447. <p><a class="el" href="class_fs_base_file.html#ab6b6b97a6382a763d6de882252412727">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>
  448. <dl class="params"><dt>Parameters</dt><dd>
  449. <table class="params">
  450. <tr><td class="paramdir">[out]</td><td class="paramname">str</td><td>Pointer to the array where the string is stored. </td></tr>
  451. <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>
  452. <tr><td class="paramdir">[in]</td><td class="paramname">delim</td><td>Optional set of delimiters. The default is "\n".</td></tr>
  453. </table>
  454. </dd>
  455. </dl>
  456. <dl class="section return"><dt>Returns</dt><dd>For success <a class="el" href="class_fs_base_file.html#ab6b6b97a6382a763d6de882252412727">fgets()</a> returns the length of the string in <em>str</em>. If no data is read, <a class="el" href="class_fs_base_file.html#ab6b6b97a6382a763d6de882252412727">fgets()</a> returns zero for EOF or -1 if an error occurred. </dd></dl>
  457. </div>
  458. </div>
  459. <a id="aef21ae3af496d80f214918bb40b5b3ba"></a>
  460. <h2 class="memtitle"><span class="permalink"><a href="#aef21ae3af496d80f214918bb40b5b3ba">&#9670;&nbsp;</a></span>fileSize()</h2>
  461. <div class="memitem">
  462. <div class="memproto">
  463. <table class="mlabels">
  464. <tr>
  465. <td class="mlabels-left">
  466. <table class="memname">
  467. <tr>
  468. <td class="memname">uint64_t FsBaseFile::fileSize </td>
  469. <td>(</td>
  470. <td class="paramname"></td><td>)</td>
  471. <td></td>
  472. </tr>
  473. </table>
  474. </td>
  475. <td class="mlabels-right">
  476. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  477. </tr>
  478. </table>
  479. </div><div class="memdoc">
  480. <dl class="section return"><dt>Returns</dt><dd>The total number of bytes in a file. </dd></dl>
  481. </div>
  482. </div>
  483. <a id="a32f813e659414892a58aa5157fe14f82"></a>
  484. <h2 class="memtitle"><span class="permalink"><a href="#a32f813e659414892a58aa5157fe14f82">&#9670;&nbsp;</a></span>flush()</h2>
  485. <div class="memitem">
  486. <div class="memproto">
  487. <table class="mlabels">
  488. <tr>
  489. <td class="mlabels-left">
  490. <table class="memname">
  491. <tr>
  492. <td class="memname">void <a class="el" href="class_stream_file.html">StreamFile</a>&lt; <a class="el" href="class_fs_base_file.html">FsBaseFile</a> , uint64_t &gt;::flush </td>
  493. <td>(</td>
  494. <td class="paramname"></td><td>)</td>
  495. <td></td>
  496. </tr>
  497. </table>
  498. </td>
  499. <td class="mlabels-right">
  500. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  501. </tr>
  502. </table>
  503. </div><div class="memdoc">
  504. <p>Ensure that any bytes written to the file are saved to the SD card. </p>
  505. </div>
  506. </div>
  507. <a id="a4bc085bc1ef0569f4ca7f14fff3e5678"></a>
  508. <h2 class="memtitle"><span class="permalink"><a href="#a4bc085bc1ef0569f4ca7f14fff3e5678">&#9670;&nbsp;</a></span>fsetpos()</h2>
  509. <div class="memitem">
  510. <div class="memproto">
  511. <table class="mlabels">
  512. <tr>
  513. <td class="mlabels-left">
  514. <table class="memname">
  515. <tr>
  516. <td class="memname">void FsBaseFile::fsetpos </td>
  517. <td>(</td>
  518. <td class="paramtype">const fspos_t *&#160;</td>
  519. <td class="paramname"><em>pos</em></td><td>)</td>
  520. <td></td>
  521. </tr>
  522. </table>
  523. </td>
  524. <td class="mlabels-right">
  525. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  526. </tr>
  527. </table>
  528. </div><div class="memdoc">
  529. <p>set position for streams </p><dl class="params"><dt>Parameters</dt><dd>
  530. <table class="params">
  531. <tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>struct with value for new position </td></tr>
  532. </table>
  533. </dd>
  534. </dl>
  535. </div>
  536. </div>
  537. <a id="a7553d4aeb68fe8d3f1b61a16c8005e34"></a>
  538. <h2 class="memtitle"><span class="permalink"><a href="#a7553d4aeb68fe8d3f1b61a16c8005e34">&#9670;&nbsp;</a></span>getError()</h2>
  539. <div class="memitem">
  540. <div class="memproto">
  541. <table class="mlabels">
  542. <tr>
  543. <td class="mlabels-left">
  544. <table class="memname">
  545. <tr>
  546. <td class="memname">uint8_t FsBaseFile::getError </td>
  547. <td>(</td>
  548. <td class="paramname"></td><td>)</td>
  549. <td></td>
  550. </tr>
  551. </table>
  552. </td>
  553. <td class="mlabels-right">
  554. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  555. </tr>
  556. </table>
  557. </div><div class="memdoc">
  558. <dl class="section return"><dt>Returns</dt><dd>All error bits. </dd></dl>
  559. </div>
  560. </div>
  561. <a id="ad2099dbe6bb8f61e1bf933d8e97b2d86"></a>
  562. <h2 class="memtitle"><span class="permalink"><a href="#ad2099dbe6bb8f61e1bf933d8e97b2d86">&#9670;&nbsp;</a></span>getName()</h2>
  563. <div class="memitem">
  564. <div class="memproto">
  565. <table class="mlabels">
  566. <tr>
  567. <td class="mlabels-left">
  568. <table class="memname">
  569. <tr>
  570. <td class="memname">size_t FsBaseFile::getName </td>
  571. <td>(</td>
  572. <td class="paramtype">char *&#160;</td>
  573. <td class="paramname"><em>name</em>, </td>
  574. </tr>
  575. <tr>
  576. <td class="paramkey"></td>
  577. <td></td>
  578. <td class="paramtype">size_t&#160;</td>
  579. <td class="paramname"><em>len</em>&#160;</td>
  580. </tr>
  581. <tr>
  582. <td></td>
  583. <td>)</td>
  584. <td></td><td></td>
  585. </tr>
  586. </table>
  587. </td>
  588. <td class="mlabels-right">
  589. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  590. </tr>
  591. </table>
  592. </div><div class="memdoc">
  593. <p>Get a file's name followed by a zero byte.</p>
  594. <dl class="params"><dt>Parameters</dt><dd>
  595. <table class="params">
  596. <tr><td class="paramdir">[out]</td><td class="paramname">name</td><td>An array of characters for the file's name. </td></tr>
  597. <tr><td class="paramdir">[in]</td><td class="paramname">len</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>
  598. </table>
  599. </dd>
  600. </dl>
  601. <dl class="section return"><dt>Returns</dt><dd>The length of the returned string. </dd></dl>
  602. </div>
  603. </div>
  604. <a id="ab5525bef93bab61569225374d475f2cb"></a>
  605. <h2 class="memtitle"><span class="permalink"><a href="#ab5525bef93bab61569225374d475f2cb">&#9670;&nbsp;</a></span>getWriteError()</h2>
  606. <div class="memitem">
  607. <div class="memproto">
  608. <table class="mlabels">
  609. <tr>
  610. <td class="mlabels-left">
  611. <table class="memname">
  612. <tr>
  613. <td class="memname">bool FsBaseFile::getWriteError </td>
  614. <td>(</td>
  615. <td class="paramname"></td><td>)</td>
  616. <td></td>
  617. </tr>
  618. </table>
  619. </td>
  620. <td class="mlabels-right">
  621. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  622. </tr>
  623. </table>
  624. </div><div class="memdoc">
  625. <dl class="section return"><dt>Returns</dt><dd>value of writeError </dd></dl>
  626. </div>
  627. </div>
  628. <a id="ae93db43779d54734855005116244f6aa"></a>
  629. <h2 class="memtitle"><span class="permalink"><a href="#ae93db43779d54734855005116244f6aa">&#9670;&nbsp;</a></span>isDir()</h2>
  630. <div class="memitem">
  631. <div class="memproto">
  632. <table class="mlabels">
  633. <tr>
  634. <td class="mlabels-left">
  635. <table class="memname">
  636. <tr>
  637. <td class="memname">bool FsBaseFile::isDir </td>
  638. <td>(</td>
  639. <td class="paramname"></td><td>)</td>
  640. <td></td>
  641. </tr>
  642. </table>
  643. </td>
  644. <td class="mlabels-right">
  645. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  646. </tr>
  647. </table>
  648. </div><div class="memdoc">
  649. <dl class="section return"><dt>Returns</dt><dd>True if this is a directory else false. </dd></dl>
  650. </div>
  651. </div>
  652. <a id="a586ad44055eca4c1b2b457299b829d44"></a>
  653. <h2 class="memtitle"><span class="permalink"><a href="#a586ad44055eca4c1b2b457299b829d44">&#9670;&nbsp;</a></span>isDirectory()</h2>
  654. <div class="memitem">
  655. <div class="memproto">
  656. <table class="mlabels">
  657. <tr>
  658. <td class="mlabels-left">
  659. <table class="memname">
  660. <tr>
  661. <td class="memname">bool <a class="el" href="class_stream_file.html">StreamFile</a>&lt; <a class="el" href="class_fs_base_file.html">FsBaseFile</a> , uint64_t &gt;::isDirectory </td>
  662. <td>(</td>
  663. <td class="paramname"></td><td>)</td>
  664. <td></td>
  665. </tr>
  666. </table>
  667. </td>
  668. <td class="mlabels-right">
  669. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  670. </tr>
  671. </table>
  672. </div><div class="memdoc">
  673. <p>This function reports if the current file is a directory or not. </p><dl class="section return"><dt>Returns</dt><dd>true if the file is a directory. </dd></dl>
  674. </div>
  675. </div>
  676. <a id="a00e76b229cbb5098e1eb88e64a41dbfb"></a>
  677. <h2 class="memtitle"><span class="permalink"><a href="#a00e76b229cbb5098e1eb88e64a41dbfb">&#9670;&nbsp;</a></span>isHidden()</h2>
  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">bool FsBaseFile::isHidden </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 class="mlabel">inherited</span></span> </td>
  694. </tr>
  695. </table>
  696. </div><div class="memdoc">
  697. <dl class="section return"><dt>Returns</dt><dd>True if this is a hidden file else false. </dd></dl>
  698. </div>
  699. </div>
  700. <a id="a707007ff19ac5e4eb94cd0b26c542e0e"></a>
  701. <h2 class="memtitle"><span class="permalink"><a href="#a707007ff19ac5e4eb94cd0b26c542e0e">&#9670;&nbsp;</a></span>isOpen()</h2>
  702. <div class="memitem">
  703. <div class="memproto">
  704. <table class="mlabels">
  705. <tr>
  706. <td class="mlabels-left">
  707. <table class="memname">
  708. <tr>
  709. <td class="memname">bool FsBaseFile::isOpen </td>
  710. <td>(</td>
  711. <td class="paramname"></td><td>)</td>
  712. <td></td>
  713. </tr>
  714. </table>
  715. </td>
  716. <td class="mlabels-right">
  717. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  718. </tr>
  719. </table>
  720. </div><div class="memdoc">
  721. <dl class="section return"><dt>Returns</dt><dd>True if this is an open file/directory else false. </dd></dl>
  722. </div>
  723. </div>
  724. <a id="a3140f64c85218c4b2f12f711483cd4c6"></a>
  725. <h2 class="memtitle"><span class="permalink"><a href="#a3140f64c85218c4b2f12f711483cd4c6">&#9670;&nbsp;</a></span>isSubDir()</h2>
  726. <div class="memitem">
  727. <div class="memproto">
  728. <table class="mlabels">
  729. <tr>
  730. <td class="mlabels-left">
  731. <table class="memname">
  732. <tr>
  733. <td class="memname">bool FsBaseFile::isSubDir </td>
  734. <td>(</td>
  735. <td class="paramname"></td><td>)</td>
  736. <td></td>
  737. </tr>
  738. </table>
  739. </td>
  740. <td class="mlabels-right">
  741. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  742. </tr>
  743. </table>
  744. </div><div class="memdoc">
  745. <dl class="section return"><dt>Returns</dt><dd>True if this is a subdirectory file else false. </dd></dl>
  746. </div>
  747. </div>
  748. <a id="aecbc336b952eebebfdfcf917863183ee"></a>
  749. <h2 class="memtitle"><span class="permalink"><a href="#aecbc336b952eebebfdfcf917863183ee">&#9670;&nbsp;</a></span>ls() <span class="overload">[1/2]</span></h2>
  750. <div class="memitem">
  751. <div class="memproto">
  752. <table class="mlabels">
  753. <tr>
  754. <td class="mlabels-left">
  755. <table class="memname">
  756. <tr>
  757. <td class="memname">bool FsBaseFile::ls </td>
  758. <td>(</td>
  759. <td class="paramtype"><a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *&#160;</td>
  760. <td class="paramname"><em>pr</em></td><td>)</td>
  761. <td></td>
  762. </tr>
  763. </table>
  764. </td>
  765. <td class="mlabels-right">
  766. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  767. </tr>
  768. </table>
  769. </div><div class="memdoc">
  770. <p>List directory contents.</p>
  771. <dl class="params"><dt>Parameters</dt><dd>
  772. <table class="params">
  773. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print object.</td></tr>
  774. </table>
  775. </dd>
  776. </dl>
  777. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  778. </div>
  779. </div>
  780. <a id="a6a254df9866966f7f97478e916fe6a7f"></a>
  781. <h2 class="memtitle"><span class="permalink"><a href="#a6a254df9866966f7f97478e916fe6a7f">&#9670;&nbsp;</a></span>ls() <span class="overload">[2/2]</span></h2>
  782. <div class="memitem">
  783. <div class="memproto">
  784. <table class="mlabels">
  785. <tr>
  786. <td class="mlabels-left">
  787. <table class="memname">
  788. <tr>
  789. <td class="memname">bool FsBaseFile::ls </td>
  790. <td>(</td>
  791. <td class="paramtype"><a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *&#160;</td>
  792. <td class="paramname"><em>pr</em>, </td>
  793. </tr>
  794. <tr>
  795. <td class="paramkey"></td>
  796. <td></td>
  797. <td class="paramtype">uint8_t&#160;</td>
  798. <td class="paramname"><em>flags</em>&#160;</td>
  799. </tr>
  800. <tr>
  801. <td></td>
  802. <td>)</td>
  803. <td></td><td></td>
  804. </tr>
  805. </table>
  806. </td>
  807. <td class="mlabels-right">
  808. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  809. </tr>
  810. </table>
  811. </div><div class="memdoc">
  812. <p>List directory contents.</p>
  813. <dl class="params"><dt>Parameters</dt><dd>
  814. <table class="params">
  815. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print object. </td></tr>
  816. <tr><td class="paramdir">[in]</td><td class="paramname">flags</td><td>The inclusive OR of</td></tr>
  817. </table>
  818. </dd>
  819. </dl>
  820. <p>LS_DATE - Print file modification date</p>
  821. <p>LS_SIZE - Print file size.</p>
  822. <p>LS_R - Recursive list of subdirectories.</p>
  823. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  824. </div>
  825. </div>
  826. <a id="a8b7aa7f2c63882e483336dfe12ef6800"></a>
  827. <h2 class="memtitle"><span class="permalink"><a href="#a8b7aa7f2c63882e483336dfe12ef6800">&#9670;&nbsp;</a></span>mkdir()</h2>
  828. <div class="memitem">
  829. <div class="memproto">
  830. <table class="mlabels">
  831. <tr>
  832. <td class="mlabels-left">
  833. <table class="memname">
  834. <tr>
  835. <td class="memname">bool FsBaseFile::mkdir </td>
  836. <td>(</td>
  837. <td class="paramtype"><a class="el" href="class_fs_base_file.html">FsBaseFile</a> *&#160;</td>
  838. <td class="paramname"><em>dir</em>, </td>
  839. </tr>
  840. <tr>
  841. <td class="paramkey"></td>
  842. <td></td>
  843. <td class="paramtype">const char *&#160;</td>
  844. <td class="paramname"><em>path</em>, </td>
  845. </tr>
  846. <tr>
  847. <td class="paramkey"></td>
  848. <td></td>
  849. <td class="paramtype">bool&#160;</td>
  850. <td class="paramname"><em>pFlag</em> = <code>true</code>&#160;</td>
  851. </tr>
  852. <tr>
  853. <td></td>
  854. <td>)</td>
  855. <td></td><td></td>
  856. </tr>
  857. </table>
  858. </td>
  859. <td class="mlabels-right">
  860. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  861. </tr>
  862. </table>
  863. </div><div class="memdoc">
  864. <p>Make a new directory.</p>
  865. <dl class="params"><dt>Parameters</dt><dd>
  866. <table class="params">
  867. <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>
  868. <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>
  869. <tr><td class="paramdir">[in]</td><td class="paramname">pFlag</td><td>Create missing parent directories if true.</td></tr>
  870. </table>
  871. </dd>
  872. </dl>
  873. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  874. </div>
  875. </div>
  876. <a id="a8792c863080576eb65ce6cacbe1dd931"></a>
  877. <h2 class="memtitle"><span class="permalink"><a href="#a8792c863080576eb65ce6cacbe1dd931">&#9670;&nbsp;</a></span>name()</h2>
  878. <div class="memitem">
  879. <div class="memproto">
  880. <table class="mlabels">
  881. <tr>
  882. <td class="mlabels-left">
  883. <table class="memname">
  884. <tr>
  885. <td class="memname">const char* <a class="el" href="class_stream_file.html">StreamFile</a>&lt; <a class="el" href="class_fs_base_file.html">FsBaseFile</a> , uint64_t &gt;::name </td>
  886. <td>(</td>
  887. <td class="paramname"></td><td>)</td>
  888. <td> const</td>
  889. </tr>
  890. </table>
  891. </td>
  892. <td class="mlabels-right">
  893. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  894. </tr>
  895. </table>
  896. </div><div class="memdoc">
  897. <p>No longer implemented due to Long File Names.</p>
  898. <p>Use <a class="el" href="class_fs_base_file.html#ad2099dbe6bb8f61e1bf933d8e97b2d86">getName(char* name, size_t size)</a>. </p><dl class="section return"><dt>Returns</dt><dd>a pointer to replacement suggestion. </dd></dl>
  899. </div>
  900. </div>
  901. <a id="aa767859d4a4b4716ebbc4ea42a6d74df"></a>
  902. <h2 class="memtitle"><span class="permalink"><a href="#aa767859d4a4b4716ebbc4ea42a6d74df">&#9670;&nbsp;</a></span>open() <span class="overload">[1/4]</span></h2>
  903. <div class="memitem">
  904. <div class="memproto">
  905. <table class="mlabels">
  906. <tr>
  907. <td class="mlabels-left">
  908. <table class="memname">
  909. <tr>
  910. <td class="memname">bool FsBaseFile::open </td>
  911. <td>(</td>
  912. <td class="paramtype"><a class="el" href="class_fs_base_file.html">FsBaseFile</a> *&#160;</td>
  913. <td class="paramname"><em>dir</em>, </td>
  914. </tr>
  915. <tr>
  916. <td class="paramkey"></td>
  917. <td></td>
  918. <td class="paramtype">const char *&#160;</td>
  919. <td class="paramname"><em>path</em>, </td>
  920. </tr>
  921. <tr>
  922. <td class="paramkey"></td>
  923. <td></td>
  924. <td class="paramtype">oflag_t&#160;</td>
  925. <td class="paramname"><em>oflag</em> = <code>O_RDONLY</code>&#160;</td>
  926. </tr>
  927. <tr>
  928. <td></td>
  929. <td>)</td>
  930. <td></td><td></td>
  931. </tr>
  932. </table>
  933. </td>
  934. <td class="mlabels-right">
  935. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  936. </tr>
  937. </table>
  938. </div><div class="memdoc">
  939. <p>Open a file or directory by name.</p>
  940. <dl class="params"><dt>Parameters</dt><dd>
  941. <table class="params">
  942. <tr><td class="paramdir">[in]</td><td class="paramname">dir</td><td>An open file instance for the directory containing the file to be opened.</td></tr>
  943. <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>
  944. <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>
  945. </table>
  946. </dd>
  947. </dl>
  948. <p>O_RDONLY - Open for reading only..</p>
  949. <p>O_READ - Same as O_RDONLY.</p>
  950. <p>O_WRONLY - Open for writing only.</p>
  951. <p>O_WRITE - Same as O_WRONLY.</p>
  952. <p>O_RDWR - Open for reading and writing.</p>
  953. <p>O_APPEND - If set, the file offset shall be set to the end of the file prior to each write.</p>
  954. <p>O_AT_END - Set the initial position at the end of the file.</p>
  955. <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>
  956. <p>O_EXCL - If O_CREAT and O_EXCL are set, <a class="el" href="class_fs_base_file.html#aa767859d4a4b4716ebbc4ea42a6d74df">open()</a> shall fail if the file exists.</p>
  957. <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>
  958. <p>WARNING: A given file must not be opened by more than one file object or file corruption may occur.</p>
  959. <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>
  960. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  961. </div>
  962. </div>
  963. <a id="ac4edea1afb935119ecaf39607016c3cc"></a>
  964. <h2 class="memtitle"><span class="permalink"><a href="#ac4edea1afb935119ecaf39607016c3cc">&#9670;&nbsp;</a></span>open() <span class="overload">[2/4]</span></h2>
  965. <div class="memitem">
  966. <div class="memproto">
  967. <table class="mlabels">
  968. <tr>
  969. <td class="mlabels-left">
  970. <table class="memname">
  971. <tr>
  972. <td class="memname">bool FsBaseFile::open </td>
  973. <td>(</td>
  974. <td class="paramtype"><a class="el" href="class_fs_base_file.html">FsBaseFile</a> *&#160;</td>
  975. <td class="paramname"><em>dir</em>, </td>
  976. </tr>
  977. <tr>
  978. <td class="paramkey"></td>
  979. <td></td>
  980. <td class="paramtype">uint32_t&#160;</td>
  981. <td class="paramname"><em>index</em>, </td>
  982. </tr>
  983. <tr>
  984. <td class="paramkey"></td>
  985. <td></td>
  986. <td class="paramtype">oflag_t&#160;</td>
  987. <td class="paramname"><em>oflag</em>&#160;</td>
  988. </tr>
  989. <tr>
  990. <td></td>
  991. <td>)</td>
  992. <td></td><td></td>
  993. </tr>
  994. </table>
  995. </td>
  996. <td class="mlabels-right">
  997. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  998. </tr>
  999. </table>
  1000. </div><div class="memdoc">
  1001. <p>Open a file by index.</p>
  1002. <dl class="params"><dt>Parameters</dt><dd>
  1003. <table class="params">
  1004. <tr><td class="paramdir">[in]</td><td class="paramname">dir</td><td>An open <a class="el" href="class_fs_file.html" title="FsBaseFile file with Arduino Stream. ">FsFile</a> instance for the directory.</td></tr>
  1005. <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>
  1006. <tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>bitwise-inclusive OR of open flags. See see FsFile::open(FsFile*, const char*, uint8_t).</td></tr>
  1007. </table>
  1008. </dd>
  1009. </dl>
  1010. <p>See <a class="el" href="class_fs_base_file.html#aa767859d4a4b4716ebbc4ea42a6d74df">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>
  1011. </div>
  1012. </div>
  1013. <a id="a9786eb47f5d001e89ff291c271517547"></a>
  1014. <h2 class="memtitle"><span class="permalink"><a href="#a9786eb47f5d001e89ff291c271517547">&#9670;&nbsp;</a></span>open() <span class="overload">[3/4]</span></h2>
  1015. <div class="memitem">
  1016. <div class="memproto">
  1017. <table class="mlabels">
  1018. <tr>
  1019. <td class="mlabels-left">
  1020. <table class="memname">
  1021. <tr>
  1022. <td class="memname">bool FsBaseFile::open </td>
  1023. <td>(</td>
  1024. <td class="paramtype"><a class="el" href="class_fs_volume.html">FsVolume</a> *&#160;</td>
  1025. <td class="paramname"><em>vol</em>, </td>
  1026. </tr>
  1027. <tr>
  1028. <td class="paramkey"></td>
  1029. <td></td>
  1030. <td class="paramtype">const char *&#160;</td>
  1031. <td class="paramname"><em>path</em>, </td>
  1032. </tr>
  1033. <tr>
  1034. <td class="paramkey"></td>
  1035. <td></td>
  1036. <td class="paramtype">oflag_t&#160;</td>
  1037. <td class="paramname"><em>oflag</em>&#160;</td>
  1038. </tr>
  1039. <tr>
  1040. <td></td>
  1041. <td>)</td>
  1042. <td></td><td></td>
  1043. </tr>
  1044. </table>
  1045. </td>
  1046. <td class="mlabels-right">
  1047. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  1048. </tr>
  1049. </table>
  1050. </div><div class="memdoc">
  1051. <p>Open a file or directory by name.</p>
  1052. <dl class="params"><dt>Parameters</dt><dd>
  1053. <table class="params">
  1054. <tr><td class="paramdir">[in]</td><td class="paramname">vol</td><td>Volume where the file is located.</td></tr>
  1055. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path for a file to be opened.</td></tr>
  1056. <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.</td></tr>
  1057. </table>
  1058. </dd>
  1059. </dl>
  1060. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1061. </div>
  1062. </div>
  1063. <a id="af44f0decd9b11dd45996e81f46e2cdee"></a>
  1064. <h2 class="memtitle"><span class="permalink"><a href="#af44f0decd9b11dd45996e81f46e2cdee">&#9670;&nbsp;</a></span>open() <span class="overload">[4/4]</span></h2>
  1065. <div class="memitem">
  1066. <div class="memproto">
  1067. <table class="mlabels">
  1068. <tr>
  1069. <td class="mlabels-left">
  1070. <table class="memname">
  1071. <tr>
  1072. <td class="memname">bool FsBaseFile::open </td>
  1073. <td>(</td>
  1074. <td class="paramtype">const char *&#160;</td>
  1075. <td class="paramname"><em>path</em>, </td>
  1076. </tr>
  1077. <tr>
  1078. <td class="paramkey"></td>
  1079. <td></td>
  1080. <td class="paramtype">oflag_t&#160;</td>
  1081. <td class="paramname"><em>oflag</em> = <code>O_RDONLY</code>&#160;</td>
  1082. </tr>
  1083. <tr>
  1084. <td></td>
  1085. <td>)</td>
  1086. <td></td><td></td>
  1087. </tr>
  1088. </table>
  1089. </td>
  1090. <td class="mlabels-right">
  1091. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1092. </tr>
  1093. </table>
  1094. </div><div class="memdoc">
  1095. <p>Open a file or directory by name.</p>
  1096. <dl class="params"><dt>Parameters</dt><dd>
  1097. <table class="params">
  1098. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path for a file to be opened.</td></tr>
  1099. <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.</td></tr>
  1100. </table>
  1101. </dd>
  1102. </dl>
  1103. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1104. </div>
  1105. </div>
  1106. <a id="acb9b1075f4db76fa7e0521c9aff9c3df"></a>
  1107. <h2 class="memtitle"><span class="permalink"><a href="#acb9b1075f4db76fa7e0521c9aff9c3df">&#9670;&nbsp;</a></span>openNext()</h2>
  1108. <div class="memitem">
  1109. <div class="memproto">
  1110. <table class="mlabels">
  1111. <tr>
  1112. <td class="mlabels-left">
  1113. <table class="memname">
  1114. <tr>
  1115. <td class="memname">bool FsBaseFile::openNext </td>
  1116. <td>(</td>
  1117. <td class="paramtype"><a class="el" href="class_fs_base_file.html">FsBaseFile</a> *&#160;</td>
  1118. <td class="paramname"><em>dir</em>, </td>
  1119. </tr>
  1120. <tr>
  1121. <td class="paramkey"></td>
  1122. <td></td>
  1123. <td class="paramtype">oflag_t&#160;</td>
  1124. <td class="paramname"><em>oflag</em> = <code>O_RDONLY</code>&#160;</td>
  1125. </tr>
  1126. <tr>
  1127. <td></td>
  1128. <td>)</td>
  1129. <td></td><td></td>
  1130. </tr>
  1131. </table>
  1132. </td>
  1133. <td class="mlabels-right">
  1134. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  1135. </tr>
  1136. </table>
  1137. </div><div class="memdoc">
  1138. <p>Opens the next file or folder in a directory. </p><dl class="params"><dt>Parameters</dt><dd>
  1139. <table class="params">
  1140. <tr><td class="paramdir">[in]</td><td class="paramname">dir</td><td>directory containing files. </td></tr>
  1141. <tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>open flags. </td></tr>
  1142. </table>
  1143. </dd>
  1144. </dl>
  1145. <dl class="section return"><dt>Returns</dt><dd>a file object. </dd></dl>
  1146. </div>
  1147. </div>
  1148. <a id="ab2f85961e3831d0d654da862becb7433"></a>
  1149. <h2 class="memtitle"><span class="permalink"><a href="#ab2f85961e3831d0d654da862becb7433">&#9670;&nbsp;</a></span>openNextFile()</h2>
  1150. <div class="memitem">
  1151. <div class="memproto">
  1152. <table class="mlabels">
  1153. <tr>
  1154. <td class="mlabels-left">
  1155. <table class="memname">
  1156. <tr>
  1157. <td class="memname"><a class="el" href="class_fs_file.html">FsFile</a> FsFile::openNextFile </td>
  1158. <td>(</td>
  1159. <td class="paramtype">oflag_t&#160;</td>
  1160. <td class="paramname"><em>oflag</em> = <code>O_RDONLY</code></td><td>)</td>
  1161. <td></td>
  1162. </tr>
  1163. </table>
  1164. </td>
  1165. <td class="mlabels-right">
  1166. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  1167. </tr>
  1168. </table>
  1169. </div><div class="memdoc">
  1170. <p>Opens the next file or folder in a directory.</p>
  1171. <dl class="params"><dt>Parameters</dt><dd>
  1172. <table class="params">
  1173. <tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>open flags. </td></tr>
  1174. </table>
  1175. </dd>
  1176. </dl>
  1177. <dl class="section return"><dt>Returns</dt><dd>a FatStream object. </dd></dl>
  1178. </div>
  1179. </div>
  1180. <a id="a3ad633f3efc2701a3a89e776436b14e1"></a>
  1181. <h2 class="memtitle"><span class="permalink"><a href="#a3ad633f3efc2701a3a89e776436b14e1">&#9670;&nbsp;</a></span>operator bool()</h2>
  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">FsBaseFile::operator bool </td>
  1190. <td>(</td>
  1191. <td class="paramname"></td><td>)</td>
  1192. <td></td>
  1193. </tr>
  1194. </table>
  1195. </td>
  1196. <td class="mlabels-right">
  1197. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1198. </tr>
  1199. </table>
  1200. </div><div class="memdoc">
  1201. <p>The parenthesis operator.</p>
  1202. <dl class="section return"><dt>Returns</dt><dd>true if a file is open. </dd></dl>
  1203. </div>
  1204. </div>
  1205. <a id="af0da96e502485133ca0cff27fa130082"></a>
  1206. <h2 class="memtitle"><span class="permalink"><a href="#af0da96e502485133ca0cff27fa130082">&#9670;&nbsp;</a></span>peek()</h2>
  1207. <div class="memitem">
  1208. <div class="memproto">
  1209. <table class="mlabels">
  1210. <tr>
  1211. <td class="mlabels-left">
  1212. <table class="memname">
  1213. <tr>
  1214. <td class="memname">int <a class="el" href="class_stream_file.html">StreamFile</a>&lt; <a class="el" href="class_fs_base_file.html">FsBaseFile</a> , uint64_t &gt;::peek </td>
  1215. <td>(</td>
  1216. <td class="paramname"></td><td>)</td>
  1217. <td></td>
  1218. </tr>
  1219. </table>
  1220. </td>
  1221. <td class="mlabels-right">
  1222. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1223. </tr>
  1224. </table>
  1225. </div><div class="memdoc">
  1226. <p>Return the next available byte without consuming it.</p>
  1227. <dl class="section return"><dt>Returns</dt><dd>The byte if no error and not at eof else -1; </dd></dl>
  1228. </div>
  1229. </div>
  1230. <a id="a18a04d1e68a0c1e3e38e5712cd9bbc03"></a>
  1231. <h2 class="memtitle"><span class="permalink"><a href="#a18a04d1e68a0c1e3e38e5712cd9bbc03">&#9670;&nbsp;</a></span>position()</h2>
  1232. <div class="memitem">
  1233. <div class="memproto">
  1234. <table class="mlabels">
  1235. <tr>
  1236. <td class="mlabels-left">
  1237. <table class="memname">
  1238. <tr>
  1239. <td class="memname">uint64_t <a class="el" href="class_stream_file.html">StreamFile</a>&lt; <a class="el" href="class_fs_base_file.html">FsBaseFile</a> , uint64_t &gt;::position </td>
  1240. <td>(</td>
  1241. <td class="paramname"></td><td>)</td>
  1242. <td></td>
  1243. </tr>
  1244. </table>
  1245. </td>
  1246. <td class="mlabels-right">
  1247. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1248. </tr>
  1249. </table>
  1250. </div><div class="memdoc">
  1251. <dl class="section return"><dt>Returns</dt><dd>the current file position. </dd></dl>
  1252. </div>
  1253. </div>
  1254. <a id="acbc037f9f07c57235bb8b30af5a53ac2"></a>
  1255. <h2 class="memtitle"><span class="permalink"><a href="#acbc037f9f07c57235bb8b30af5a53ac2">&#9670;&nbsp;</a></span>preAllocate()</h2>
  1256. <div class="memitem">
  1257. <div class="memproto">
  1258. <table class="mlabels">
  1259. <tr>
  1260. <td class="mlabels-left">
  1261. <table class="memname">
  1262. <tr>
  1263. <td class="memname">bool FsBaseFile::preAllocate </td>
  1264. <td>(</td>
  1265. <td class="paramtype">uint64_t&#160;</td>
  1266. <td class="paramname"><em>length</em></td><td>)</td>
  1267. <td></td>
  1268. </tr>
  1269. </table>
  1270. </td>
  1271. <td class="mlabels-right">
  1272. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1273. </tr>
  1274. </table>
  1275. </div><div class="memdoc">
  1276. <p>Allocate contiguous clusters to an empty file.</p>
  1277. <p>The file must be empty with no clusters allocated.</p>
  1278. <p>The file will contain uninitialized data for FAT16/FAT32 files. exFAT files will have zero validLength and dataLength will equal the requested length.</p>
  1279. <dl class="params"><dt>Parameters</dt><dd>
  1280. <table class="params">
  1281. <tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>size of the file in bytes. </td></tr>
  1282. </table>
  1283. </dd>
  1284. </dl>
  1285. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1286. </div>
  1287. </div>
  1288. <a id="a264ba61530aee50dbe9659d41dd2c1d6"></a>
  1289. <h2 class="memtitle"><span class="permalink"><a href="#a264ba61530aee50dbe9659d41dd2c1d6">&#9670;&nbsp;</a></span>printAccessDateTime()</h2>
  1290. <div class="memitem">
  1291. <div class="memproto">
  1292. <table class="mlabels">
  1293. <tr>
  1294. <td class="mlabels-left">
  1295. <table class="memname">
  1296. <tr>
  1297. <td class="memname">size_t FsBaseFile::printAccessDateTime </td>
  1298. <td>(</td>
  1299. <td class="paramtype"><a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *&#160;</td>
  1300. <td class="paramname"><em>pr</em></td><td>)</td>
  1301. <td></td>
  1302. </tr>
  1303. </table>
  1304. </td>
  1305. <td class="mlabels-right">
  1306. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1307. </tr>
  1308. </table>
  1309. </div><div class="memdoc">
  1310. <p>Print a file's access date and time</p>
  1311. <dl class="params"><dt>Parameters</dt><dd>
  1312. <table class="params">
  1313. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
  1314. </table>
  1315. </dd>
  1316. </dl>
  1317. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1318. </div>
  1319. </div>
  1320. <a id="a3f75ac7eb6643afcabae28e8c93479c8"></a>
  1321. <h2 class="memtitle"><span class="permalink"><a href="#a3f75ac7eb6643afcabae28e8c93479c8">&#9670;&nbsp;</a></span>printCreateDateTime()</h2>
  1322. <div class="memitem">
  1323. <div class="memproto">
  1324. <table class="mlabels">
  1325. <tr>
  1326. <td class="mlabels-left">
  1327. <table class="memname">
  1328. <tr>
  1329. <td class="memname">size_t FsBaseFile::printCreateDateTime </td>
  1330. <td>(</td>
  1331. <td class="paramtype"><a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *&#160;</td>
  1332. <td class="paramname"><em>pr</em></td><td>)</td>
  1333. <td></td>
  1334. </tr>
  1335. </table>
  1336. </td>
  1337. <td class="mlabels-right">
  1338. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1339. </tr>
  1340. </table>
  1341. </div><div class="memdoc">
  1342. <p>Print a file's creation date and time</p>
  1343. <dl class="params"><dt>Parameters</dt><dd>
  1344. <table class="params">
  1345. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
  1346. </table>
  1347. </dd>
  1348. </dl>
  1349. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1350. </div>
  1351. </div>
  1352. <a id="a911ae825e67d7e6ade4a672595e060d6"></a>
  1353. <h2 class="memtitle"><span class="permalink"><a href="#a911ae825e67d7e6ade4a672595e060d6">&#9670;&nbsp;</a></span>printField() <span class="overload">[1/3]</span></h2>
  1354. <div class="memitem">
  1355. <div class="memproto">
  1356. <table class="mlabels">
  1357. <tr>
  1358. <td class="mlabels-left">
  1359. <table class="memname">
  1360. <tr>
  1361. <td class="memname">size_t FsBaseFile::printField </td>
  1362. <td>(</td>
  1363. <td class="paramtype">double&#160;</td>
  1364. <td class="paramname"><em>value</em>, </td>
  1365. </tr>
  1366. <tr>
  1367. <td class="paramkey"></td>
  1368. <td></td>
  1369. <td class="paramtype">char&#160;</td>
  1370. <td class="paramname"><em>term</em>, </td>
  1371. </tr>
  1372. <tr>
  1373. <td class="paramkey"></td>
  1374. <td></td>
  1375. <td class="paramtype">uint8_t&#160;</td>
  1376. <td class="paramname"><em>prec</em> = <code>2</code>&#160;</td>
  1377. </tr>
  1378. <tr>
  1379. <td></td>
  1380. <td>)</td>
  1381. <td></td><td></td>
  1382. </tr>
  1383. </table>
  1384. </td>
  1385. <td class="mlabels-right">
  1386. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1387. </tr>
  1388. </table>
  1389. </div><div class="memdoc">
  1390. <p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
  1391. <table class="params">
  1392. <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
  1393. <tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
  1394. <tr><td class="paramdir">[in]</td><td class="paramname">prec</td><td>Number of digits after decimal point. </td></tr>
  1395. </table>
  1396. </dd>
  1397. </dl>
  1398. <dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
  1399. </div>
  1400. </div>
  1401. <a id="a5dd2738efe2e550f56037536bc252f13"></a>
  1402. <h2 class="memtitle"><span class="permalink"><a href="#a5dd2738efe2e550f56037536bc252f13">&#9670;&nbsp;</a></span>printField() <span class="overload">[2/3]</span></h2>
  1403. <div class="memitem">
  1404. <div class="memproto">
  1405. <table class="mlabels">
  1406. <tr>
  1407. <td class="mlabels-left">
  1408. <table class="memname">
  1409. <tr>
  1410. <td class="memname">size_t FsBaseFile::printField </td>
  1411. <td>(</td>
  1412. <td class="paramtype">float&#160;</td>
  1413. <td class="paramname"><em>value</em>, </td>
  1414. </tr>
  1415. <tr>
  1416. <td class="paramkey"></td>
  1417. <td></td>
  1418. <td class="paramtype">char&#160;</td>
  1419. <td class="paramname"><em>term</em>, </td>
  1420. </tr>
  1421. <tr>
  1422. <td class="paramkey"></td>
  1423. <td></td>
  1424. <td class="paramtype">uint8_t&#160;</td>
  1425. <td class="paramname"><em>prec</em> = <code>2</code>&#160;</td>
  1426. </tr>
  1427. <tr>
  1428. <td></td>
  1429. <td>)</td>
  1430. <td></td><td></td>
  1431. </tr>
  1432. </table>
  1433. </td>
  1434. <td class="mlabels-right">
  1435. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1436. </tr>
  1437. </table>
  1438. </div><div class="memdoc">
  1439. <p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
  1440. <table class="params">
  1441. <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
  1442. <tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
  1443. <tr><td class="paramdir">[in]</td><td class="paramname">prec</td><td>Number of digits after decimal point. </td></tr>
  1444. </table>
  1445. </dd>
  1446. </dl>
  1447. <dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
  1448. </div>
  1449. </div>
  1450. <a id="a45639312b8c5aa9ceddb19e654e902b4"></a>
  1451. <h2 class="memtitle"><span class="permalink"><a href="#a45639312b8c5aa9ceddb19e654e902b4">&#9670;&nbsp;</a></span>printField() <span class="overload">[3/3]</span></h2>
  1452. <div class="memitem">
  1453. <div class="memproto">
  1454. <div class="memtemplate">
  1455. template&lt;typename Type &gt; </div>
  1456. <table class="mlabels">
  1457. <tr>
  1458. <td class="mlabels-left">
  1459. <table class="memname">
  1460. <tr>
  1461. <td class="memname">size_t FsBaseFile::printField </td>
  1462. <td>(</td>
  1463. <td class="paramtype">Type&#160;</td>
  1464. <td class="paramname"><em>value</em>, </td>
  1465. </tr>
  1466. <tr>
  1467. <td class="paramkey"></td>
  1468. <td></td>
  1469. <td class="paramtype">char&#160;</td>
  1470. <td class="paramname"><em>term</em>&#160;</td>
  1471. </tr>
  1472. <tr>
  1473. <td></td>
  1474. <td>)</td>
  1475. <td></td><td></td>
  1476. </tr>
  1477. </table>
  1478. </td>
  1479. <td class="mlabels-right">
  1480. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1481. </tr>
  1482. </table>
  1483. </div><div class="memdoc">
  1484. <p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
  1485. <table class="params">
  1486. <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
  1487. <tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
  1488. </table>
  1489. </dd>
  1490. </dl>
  1491. <dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
  1492. </div>
  1493. </div>
  1494. <a id="a6760471e3c445f66b94f3f0e96fdfe10"></a>
  1495. <h2 class="memtitle"><span class="permalink"><a href="#a6760471e3c445f66b94f3f0e96fdfe10">&#9670;&nbsp;</a></span>printFileSize()</h2>
  1496. <div class="memitem">
  1497. <div class="memproto">
  1498. <table class="mlabels">
  1499. <tr>
  1500. <td class="mlabels-left">
  1501. <table class="memname">
  1502. <tr>
  1503. <td class="memname">size_t FsBaseFile::printFileSize </td>
  1504. <td>(</td>
  1505. <td class="paramtype"><a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *&#160;</td>
  1506. <td class="paramname"><em>pr</em></td><td>)</td>
  1507. <td></td>
  1508. </tr>
  1509. </table>
  1510. </td>
  1511. <td class="mlabels-right">
  1512. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1513. </tr>
  1514. </table>
  1515. </div><div class="memdoc">
  1516. <p>Print a file's size.</p>
  1517. <dl class="params"><dt>Parameters</dt><dd>
  1518. <table class="params">
  1519. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
  1520. </table>
  1521. </dd>
  1522. </dl>
  1523. <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>
  1524. </div>
  1525. </div>
  1526. <a id="a0f2f813496fa156f9808a5d33c2d8746"></a>
  1527. <h2 class="memtitle"><span class="permalink"><a href="#a0f2f813496fa156f9808a5d33c2d8746">&#9670;&nbsp;</a></span>printModifyDateTime()</h2>
  1528. <div class="memitem">
  1529. <div class="memproto">
  1530. <table class="mlabels">
  1531. <tr>
  1532. <td class="mlabels-left">
  1533. <table class="memname">
  1534. <tr>
  1535. <td class="memname">size_t FsBaseFile::printModifyDateTime </td>
  1536. <td>(</td>
  1537. <td class="paramtype"><a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *&#160;</td>
  1538. <td class="paramname"><em>pr</em></td><td>)</td>
  1539. <td></td>
  1540. </tr>
  1541. </table>
  1542. </td>
  1543. <td class="mlabels-right">
  1544. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1545. </tr>
  1546. </table>
  1547. </div><div class="memdoc">
  1548. <p>Print a file's modify date and time</p>
  1549. <dl class="params"><dt>Parameters</dt><dd>
  1550. <table class="params">
  1551. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
  1552. </table>
  1553. </dd>
  1554. </dl>
  1555. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1556. </div>
  1557. </div>
  1558. <a id="a178a1cbe2bce19758a55bd00fa262732"></a>
  1559. <h2 class="memtitle"><span class="permalink"><a href="#a178a1cbe2bce19758a55bd00fa262732">&#9670;&nbsp;</a></span>printName()</h2>
  1560. <div class="memitem">
  1561. <div class="memproto">
  1562. <table class="mlabels">
  1563. <tr>
  1564. <td class="mlabels-left">
  1565. <table class="memname">
  1566. <tr>
  1567. <td class="memname">size_t FsBaseFile::printName </td>
  1568. <td>(</td>
  1569. <td class="paramtype"><a class="el" href="_sys_call_8h.html#ab4f210a7e2149c6c531486f1713c647b">print_t</a> *&#160;</td>
  1570. <td class="paramname"><em>pr</em></td><td>)</td>
  1571. <td></td>
  1572. </tr>
  1573. </table>
  1574. </td>
  1575. <td class="mlabels-right">
  1576. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1577. </tr>
  1578. </table>
  1579. </div><div class="memdoc">
  1580. <p>Print a file's name</p>
  1581. <dl class="params"><dt>Parameters</dt><dd>
  1582. <table class="params">
  1583. <tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
  1584. </table>
  1585. </dd>
  1586. </dl>
  1587. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1588. </div>
  1589. </div>
  1590. <a id="a249a5d428f303e2a8e7c3ae476e74829"></a>
  1591. <h2 class="memtitle"><span class="permalink"><a href="#a249a5d428f303e2a8e7c3ae476e74829">&#9670;&nbsp;</a></span>read() <span class="overload">[1/2]</span></h2>
  1592. <div class="memitem">
  1593. <div class="memproto">
  1594. <table class="mlabels">
  1595. <tr>
  1596. <td class="mlabels-left">
  1597. <table class="memname">
  1598. <tr>
  1599. <td class="memname">int <a class="el" href="class_stream_file.html">StreamFile</a>&lt; <a class="el" href="class_fs_base_file.html">FsBaseFile</a> , uint64_t &gt;::read </td>
  1600. <td>(</td>
  1601. <td class="paramname"></td><td>)</td>
  1602. <td></td>
  1603. </tr>
  1604. </table>
  1605. </td>
  1606. <td class="mlabels-right">
  1607. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1608. </tr>
  1609. </table>
  1610. </div><div class="memdoc">
  1611. <p>Read the next byte from a file.</p>
  1612. <dl class="section return"><dt>Returns</dt><dd>For success return the next byte in the file as an int. If an error occurs or end of file is reached return -1. </dd></dl>
  1613. </div>
  1614. </div>
  1615. <a id="ae8d8cb4cceda9d56e8dae692d04a46e6"></a>
  1616. <h2 class="memtitle"><span class="permalink"><a href="#ae8d8cb4cceda9d56e8dae692d04a46e6">&#9670;&nbsp;</a></span>read() <span class="overload">[2/2]</span></h2>
  1617. <div class="memitem">
  1618. <div class="memproto">
  1619. <table class="mlabels">
  1620. <tr>
  1621. <td class="mlabels-left">
  1622. <table class="memname">
  1623. <tr>
  1624. <td class="memname">int FsBaseFile::read </td>
  1625. <td>(</td>
  1626. <td class="paramtype">void *&#160;</td>
  1627. <td class="paramname"><em>buf</em>, </td>
  1628. </tr>
  1629. <tr>
  1630. <td class="paramkey"></td>
  1631. <td></td>
  1632. <td class="paramtype">size_t&#160;</td>
  1633. <td class="paramname"><em>count</em>&#160;</td>
  1634. </tr>
  1635. <tr>
  1636. <td></td>
  1637. <td>)</td>
  1638. <td></td><td></td>
  1639. </tr>
  1640. </table>
  1641. </td>
  1642. <td class="mlabels-right">
  1643. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1644. </tr>
  1645. </table>
  1646. </div><div class="memdoc">
  1647. <p>Read data from a file starting at the current position.</p>
  1648. <dl class="params"><dt>Parameters</dt><dd>
  1649. <table class="params">
  1650. <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Pointer to the location that will receive the data.</td></tr>
  1651. <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Maximum number of bytes to read.</td></tr>
  1652. </table>
  1653. </dd>
  1654. </dl>
  1655. <dl class="section return"><dt>Returns</dt><dd>For success <a class="el" href="class_stream_file.html#a249a5d428f303e2a8e7c3ae476e74829">read()</a> returns the number of bytes read. A value less than <em>count</em>, including zero, will be returned if end of file is reached. If an error occurs, <a class="el" href="class_stream_file.html#a249a5d428f303e2a8e7c3ae476e74829">read()</a> returns -1. Possible errors include <a class="el" href="class_stream_file.html#a249a5d428f303e2a8e7c3ae476e74829">read()</a> called before a file has been opened, corrupt file system or an I/O error occurred. </dd></dl>
  1656. </div>
  1657. </div>
  1658. <a id="a8d21f9df86e846e34c3bb11cf7db21bc"></a>
  1659. <h2 class="memtitle"><span class="permalink"><a href="#a8d21f9df86e846e34c3bb11cf7db21bc">&#9670;&nbsp;</a></span>remove() <span class="overload">[1/2]</span></h2>
  1660. <div class="memitem">
  1661. <div class="memproto">
  1662. <table class="mlabels">
  1663. <tr>
  1664. <td class="mlabels-left">
  1665. <table class="memname">
  1666. <tr>
  1667. <td class="memname">bool FsBaseFile::remove </td>
  1668. <td>(</td>
  1669. <td class="paramname"></td><td>)</td>
  1670. <td></td>
  1671. </tr>
  1672. </table>
  1673. </td>
  1674. <td class="mlabels-right">
  1675. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  1676. </tr>
  1677. </table>
  1678. </div><div class="memdoc">
  1679. <p>Remove a file.</p>
  1680. <p>The directory entry and all data for the file are deleted.</p>
  1681. <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>
  1682. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1683. </div>
  1684. </div>
  1685. <a id="a64feff69c4f09e56247c7f9dc7c74f34"></a>
  1686. <h2 class="memtitle"><span class="permalink"><a href="#a64feff69c4f09e56247c7f9dc7c74f34">&#9670;&nbsp;</a></span>remove() <span class="overload">[2/2]</span></h2>
  1687. <div class="memitem">
  1688. <div class="memproto">
  1689. <table class="mlabels">
  1690. <tr>
  1691. <td class="mlabels-left">
  1692. <table class="memname">
  1693. <tr>
  1694. <td class="memname">bool FsBaseFile::remove </td>
  1695. <td>(</td>
  1696. <td class="paramtype">const char *&#160;</td>
  1697. <td class="paramname"><em>path</em></td><td>)</td>
  1698. <td></td>
  1699. </tr>
  1700. </table>
  1701. </td>
  1702. <td class="mlabels-right">
  1703. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1704. </tr>
  1705. </table>
  1706. </div><div class="memdoc">
  1707. <p>Remove a file.</p>
  1708. <p>The directory entry and all data for the file are deleted.</p>
  1709. <dl class="params"><dt>Parameters</dt><dd>
  1710. <table class="params">
  1711. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>Path for the file to be removed.</td></tr>
  1712. </table>
  1713. </dd>
  1714. </dl>
  1715. <p>Example use: dirFile.remove(filenameToRemove);</p>
  1716. <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>
  1717. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1718. </div>
  1719. </div>
  1720. <a id="af532d87177e86995a053503eb9152115"></a>
  1721. <h2 class="memtitle"><span class="permalink"><a href="#af532d87177e86995a053503eb9152115">&#9670;&nbsp;</a></span>rename() <span class="overload">[1/2]</span></h2>
  1722. <div class="memitem">
  1723. <div class="memproto">
  1724. <table class="mlabels">
  1725. <tr>
  1726. <td class="mlabels-left">
  1727. <table class="memname">
  1728. <tr>
  1729. <td class="memname">bool FsBaseFile::rename </td>
  1730. <td>(</td>
  1731. <td class="paramtype">const char *&#160;</td>
  1732. <td class="paramname"><em>newPath</em></td><td>)</td>
  1733. <td></td>
  1734. </tr>
  1735. </table>
  1736. </td>
  1737. <td class="mlabels-right">
  1738. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1739. </tr>
  1740. </table>
  1741. </div><div class="memdoc">
  1742. <p>Rename a file or subdirectory.</p>
  1743. <dl class="params"><dt>Parameters</dt><dd>
  1744. <table class="params">
  1745. <tr><td class="paramdir">[in]</td><td class="paramname">newPath</td><td>New path name for the file/directory.</td></tr>
  1746. </table>
  1747. </dd>
  1748. </dl>
  1749. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1750. </div>
  1751. </div>
  1752. <a id="a4e4347f6e89bf0b487824dbdc5b82068"></a>
  1753. <h2 class="memtitle"><span class="permalink"><a href="#a4e4347f6e89bf0b487824dbdc5b82068">&#9670;&nbsp;</a></span>rename() <span class="overload">[2/2]</span></h2>
  1754. <div class="memitem">
  1755. <div class="memproto">
  1756. <table class="mlabels">
  1757. <tr>
  1758. <td class="mlabels-left">
  1759. <table class="memname">
  1760. <tr>
  1761. <td class="memname">bool FsBaseFile::rename </td>
  1762. <td>(</td>
  1763. <td class="paramtype"><a class="el" href="class_fs_base_file.html">FsBaseFile</a> *&#160;</td>
  1764. <td class="paramname"><em>dirFile</em>, </td>
  1765. </tr>
  1766. <tr>
  1767. <td class="paramkey"></td>
  1768. <td></td>
  1769. <td class="paramtype">const char *&#160;</td>
  1770. <td class="paramname"><em>newPath</em>&#160;</td>
  1771. </tr>
  1772. <tr>
  1773. <td></td>
  1774. <td>)</td>
  1775. <td></td><td></td>
  1776. </tr>
  1777. </table>
  1778. </td>
  1779. <td class="mlabels-right">
  1780. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1781. </tr>
  1782. </table>
  1783. </div><div class="memdoc">
  1784. <p>Rename a file or subdirectory.</p>
  1785. <dl class="params"><dt>Parameters</dt><dd>
  1786. <table class="params">
  1787. <tr><td class="paramdir">[in]</td><td class="paramname">dirFile</td><td>Directory for the new path. </td></tr>
  1788. <tr><td class="paramdir">[in]</td><td class="paramname">newPath</td><td>New path name for the file/directory.</td></tr>
  1789. </table>
  1790. </dd>
  1791. </dl>
  1792. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1793. </div>
  1794. </div>
  1795. <a id="a22f8ef845d610493ebe314e19ddda561"></a>
  1796. <h2 class="memtitle"><span class="permalink"><a href="#a22f8ef845d610493ebe314e19ddda561">&#9670;&nbsp;</a></span>rewind()</h2>
  1797. <div class="memitem">
  1798. <div class="memproto">
  1799. <table class="mlabels">
  1800. <tr>
  1801. <td class="mlabels-left">
  1802. <table class="memname">
  1803. <tr>
  1804. <td class="memname">void FsBaseFile::rewind </td>
  1805. <td>(</td>
  1806. <td class="paramname"></td><td>)</td>
  1807. <td></td>
  1808. </tr>
  1809. </table>
  1810. </td>
  1811. <td class="mlabels-right">
  1812. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1813. </tr>
  1814. </table>
  1815. </div><div class="memdoc">
  1816. <p>Set the file's current position to zero. </p>
  1817. </div>
  1818. </div>
  1819. <a id="a91e8cfbde27d6879b4f51d2ceb2a9f06"></a>
  1820. <h2 class="memtitle"><span class="permalink"><a href="#a91e8cfbde27d6879b4f51d2ceb2a9f06">&#9670;&nbsp;</a></span>rewindDirectory()</h2>
  1821. <div class="memitem">
  1822. <div class="memproto">
  1823. <table class="mlabels">
  1824. <tr>
  1825. <td class="mlabels-left">
  1826. <table class="memname">
  1827. <tr>
  1828. <td class="memname">void <a class="el" href="class_stream_file.html">StreamFile</a>&lt; <a class="el" href="class_fs_base_file.html">FsBaseFile</a> , uint64_t &gt;::rewindDirectory </td>
  1829. <td>(</td>
  1830. <td class="paramname"></td><td>)</td>
  1831. <td></td>
  1832. </tr>
  1833. </table>
  1834. </td>
  1835. <td class="mlabels-right">
  1836. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1837. </tr>
  1838. </table>
  1839. </div><div class="memdoc">
  1840. <p>Rewind a file if it is a directory </p>
  1841. </div>
  1842. </div>
  1843. <a id="ac47870fd89b0849cda33f2780918a286"></a>
  1844. <h2 class="memtitle"><span class="permalink"><a href="#ac47870fd89b0849cda33f2780918a286">&#9670;&nbsp;</a></span>rmdir()</h2>
  1845. <div class="memitem">
  1846. <div class="memproto">
  1847. <table class="mlabels">
  1848. <tr>
  1849. <td class="mlabels-left">
  1850. <table class="memname">
  1851. <tr>
  1852. <td class="memname">bool FsBaseFile::rmdir </td>
  1853. <td>(</td>
  1854. <td class="paramname"></td><td>)</td>
  1855. <td></td>
  1856. </tr>
  1857. </table>
  1858. </td>
  1859. <td class="mlabels-right">
  1860. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  1861. </tr>
  1862. </table>
  1863. </div><div class="memdoc">
  1864. <p>Remove a directory file.</p>
  1865. <p>The directory file will be removed only if it is empty and is not the root directory. <a class="el" href="class_fs_base_file.html#ac47870fd89b0849cda33f2780918a286">rmdir()</a> follows DOS and Windows and ignores the read-only attribute for the directory.</p>
  1866. <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>
  1867. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1868. </div>
  1869. </div>
  1870. <a id="a773ee6f661fc689a5187f51cb5498086"></a>
  1871. <h2 class="memtitle"><span class="permalink"><a href="#a773ee6f661fc689a5187f51cb5498086">&#9670;&nbsp;</a></span>seek()</h2>
  1872. <div class="memitem">
  1873. <div class="memproto">
  1874. <table class="mlabels">
  1875. <tr>
  1876. <td class="mlabels-left">
  1877. <table class="memname">
  1878. <tr>
  1879. <td class="memname">bool <a class="el" href="class_stream_file.html">StreamFile</a>&lt; <a class="el" href="class_fs_base_file.html">FsBaseFile</a> , uint64_t &gt;::seek </td>
  1880. <td>(</td>
  1881. <td class="paramtype">uint64_t&#160;</td>
  1882. <td class="paramname"><em>pos</em></td><td>)</td>
  1883. <td></td>
  1884. </tr>
  1885. </table>
  1886. </td>
  1887. <td class="mlabels-right">
  1888. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1889. </tr>
  1890. </table>
  1891. </div><div class="memdoc">
  1892. <p>Seek to a new position in the file, which must be between 0 and the size of the file (inclusive).</p>
  1893. <dl class="params"><dt>Parameters</dt><dd>
  1894. <table class="params">
  1895. <tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>the new file position. </td></tr>
  1896. </table>
  1897. </dd>
  1898. </dl>
  1899. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1900. </div>
  1901. </div>
  1902. <a id="a5fa242a4598eab5caa6efd4bdf62f5c0"></a>
  1903. <h2 class="memtitle"><span class="permalink"><a href="#a5fa242a4598eab5caa6efd4bdf62f5c0">&#9670;&nbsp;</a></span>seekCur()</h2>
  1904. <div class="memitem">
  1905. <div class="memproto">
  1906. <table class="mlabels">
  1907. <tr>
  1908. <td class="mlabels-left">
  1909. <table class="memname">
  1910. <tr>
  1911. <td class="memname">bool FsBaseFile::seekCur </td>
  1912. <td>(</td>
  1913. <td class="paramtype">int64_t&#160;</td>
  1914. <td class="paramname"><em>offset</em></td><td>)</td>
  1915. <td></td>
  1916. </tr>
  1917. </table>
  1918. </td>
  1919. <td class="mlabels-right">
  1920. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1921. </tr>
  1922. </table>
  1923. </div><div class="memdoc">
  1924. <p>Set the files position to current position + <em>pos</em>. See <a class="el" href="class_fs_base_file.html#a460f7598c903b8a4b4fe868dacccb6dd">seekSet()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  1925. <table class="params">
  1926. <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>The new position in bytes from the current position. </td></tr>
  1927. </table>
  1928. </dd>
  1929. </dl>
  1930. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1931. </div>
  1932. </div>
  1933. <a id="ade9f9a9ac4d3e0a392a6cc45c9551767"></a>
  1934. <h2 class="memtitle"><span class="permalink"><a href="#ade9f9a9ac4d3e0a392a6cc45c9551767">&#9670;&nbsp;</a></span>seekEnd()</h2>
  1935. <div class="memitem">
  1936. <div class="memproto">
  1937. <table class="mlabels">
  1938. <tr>
  1939. <td class="mlabels-left">
  1940. <table class="memname">
  1941. <tr>
  1942. <td class="memname">bool FsBaseFile::seekEnd </td>
  1943. <td>(</td>
  1944. <td class="paramtype">int64_t&#160;</td>
  1945. <td class="paramname"><em>offset</em> = <code>0</code></td><td>)</td>
  1946. <td></td>
  1947. </tr>
  1948. </table>
  1949. </td>
  1950. <td class="mlabels-right">
  1951. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1952. </tr>
  1953. </table>
  1954. </div><div class="memdoc">
  1955. <p>Set the files position to end-of-file + <em>offset</em>. See <a class="el" href="class_fs_base_file.html#a460f7598c903b8a4b4fe868dacccb6dd">seekSet()</a>. Can't be used for directory files since file size is not defined. </p><dl class="params"><dt>Parameters</dt><dd>
  1956. <table class="params">
  1957. <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>The new position in bytes from end-of-file. </td></tr>
  1958. </table>
  1959. </dd>
  1960. </dl>
  1961. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1962. </div>
  1963. </div>
  1964. <a id="a460f7598c903b8a4b4fe868dacccb6dd"></a>
  1965. <h2 class="memtitle"><span class="permalink"><a href="#a460f7598c903b8a4b4fe868dacccb6dd">&#9670;&nbsp;</a></span>seekSet()</h2>
  1966. <div class="memitem">
  1967. <div class="memproto">
  1968. <table class="mlabels">
  1969. <tr>
  1970. <td class="mlabels-left">
  1971. <table class="memname">
  1972. <tr>
  1973. <td class="memname">bool FsBaseFile::seekSet </td>
  1974. <td>(</td>
  1975. <td class="paramtype">uint64_t&#160;</td>
  1976. <td class="paramname"><em>pos</em></td><td>)</td>
  1977. <td></td>
  1978. </tr>
  1979. </table>
  1980. </td>
  1981. <td class="mlabels-right">
  1982. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  1983. </tr>
  1984. </table>
  1985. </div><div class="memdoc">
  1986. <p>Sets a file's position.</p>
  1987. <dl class="params"><dt>Parameters</dt><dd>
  1988. <table class="params">
  1989. <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>
  1990. </table>
  1991. </dd>
  1992. </dl>
  1993. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  1994. </div>
  1995. </div>
  1996. <a id="a5813d451e7f7ba57a04d177caffc5a9f"></a>
  1997. <h2 class="memtitle"><span class="permalink"><a href="#a5813d451e7f7ba57a04d177caffc5a9f">&#9670;&nbsp;</a></span>size()</h2>
  1998. <div class="memitem">
  1999. <div class="memproto">
  2000. <table class="mlabels">
  2001. <tr>
  2002. <td class="mlabels-left">
  2003. <table class="memname">
  2004. <tr>
  2005. <td class="memname">uint64_t <a class="el" href="class_stream_file.html">StreamFile</a>&lt; <a class="el" href="class_fs_base_file.html">FsBaseFile</a> , uint64_t &gt;::size </td>
  2006. <td>(</td>
  2007. <td class="paramname"></td><td>)</td>
  2008. <td></td>
  2009. </tr>
  2010. </table>
  2011. </td>
  2012. <td class="mlabels-right">
  2013. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  2014. </tr>
  2015. </table>
  2016. </div><div class="memdoc">
  2017. <dl class="section return"><dt>Returns</dt><dd>the file's size. </dd></dl>
  2018. </div>
  2019. </div>
  2020. <a id="acf2d9261c5c1b1b022a0414cdfe0a17b"></a>
  2021. <h2 class="memtitle"><span class="permalink"><a href="#acf2d9261c5c1b1b022a0414cdfe0a17b">&#9670;&nbsp;</a></span>sync()</h2>
  2022. <div class="memitem">
  2023. <div class="memproto">
  2024. <table class="mlabels">
  2025. <tr>
  2026. <td class="mlabels-left">
  2027. <table class="memname">
  2028. <tr>
  2029. <td class="memname">bool FsBaseFile::sync </td>
  2030. <td>(</td>
  2031. <td class="paramname"></td><td>)</td>
  2032. <td></td>
  2033. </tr>
  2034. </table>
  2035. </td>
  2036. <td class="mlabels-right">
  2037. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  2038. </tr>
  2039. </table>
  2040. </div><div class="memdoc">
  2041. <p>The <a class="el" href="class_fs_base_file.html#acf2d9261c5c1b1b022a0414cdfe0a17b">sync()</a> call causes all modified data and directory fields to be written to the storage device.</p>
  2042. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  2043. </div>
  2044. </div>
  2045. <a id="acea65e639feebaac01964af02a77d324"></a>
  2046. <h2 class="memtitle"><span class="permalink"><a href="#acea65e639feebaac01964af02a77d324">&#9670;&nbsp;</a></span>timestamp()</h2>
  2047. <div class="memitem">
  2048. <div class="memproto">
  2049. <table class="mlabels">
  2050. <tr>
  2051. <td class="mlabels-left">
  2052. <table class="memname">
  2053. <tr>
  2054. <td class="memname">bool FsBaseFile::timestamp </td>
  2055. <td>(</td>
  2056. <td class="paramtype">uint8_t&#160;</td>
  2057. <td class="paramname"><em>flags</em>, </td>
  2058. </tr>
  2059. <tr>
  2060. <td class="paramkey"></td>
  2061. <td></td>
  2062. <td class="paramtype">uint16_t&#160;</td>
  2063. <td class="paramname"><em>year</em>, </td>
  2064. </tr>
  2065. <tr>
  2066. <td class="paramkey"></td>
  2067. <td></td>
  2068. <td class="paramtype">uint8_t&#160;</td>
  2069. <td class="paramname"><em>month</em>, </td>
  2070. </tr>
  2071. <tr>
  2072. <td class="paramkey"></td>
  2073. <td></td>
  2074. <td class="paramtype">uint8_t&#160;</td>
  2075. <td class="paramname"><em>day</em>, </td>
  2076. </tr>
  2077. <tr>
  2078. <td class="paramkey"></td>
  2079. <td></td>
  2080. <td class="paramtype">uint8_t&#160;</td>
  2081. <td class="paramname"><em>hour</em>, </td>
  2082. </tr>
  2083. <tr>
  2084. <td class="paramkey"></td>
  2085. <td></td>
  2086. <td class="paramtype">uint8_t&#160;</td>
  2087. <td class="paramname"><em>minute</em>, </td>
  2088. </tr>
  2089. <tr>
  2090. <td class="paramkey"></td>
  2091. <td></td>
  2092. <td class="paramtype">uint8_t&#160;</td>
  2093. <td class="paramname"><em>second</em>&#160;</td>
  2094. </tr>
  2095. <tr>
  2096. <td></td>
  2097. <td>)</td>
  2098. <td></td><td></td>
  2099. </tr>
  2100. </table>
  2101. </td>
  2102. <td class="mlabels-right">
  2103. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  2104. </tr>
  2105. </table>
  2106. </div><div class="memdoc">
  2107. <p>Set a file's timestamps in its directory entry.</p>
  2108. <dl class="params"><dt>Parameters</dt><dd>
  2109. <table class="params">
  2110. <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>
  2111. </table>
  2112. </dd>
  2113. </dl>
  2114. <p>T_ACCESS - Set the file's last access date.</p>
  2115. <p>T_CREATE - Set the file's creation date and time.</p>
  2116. <p>T_WRITE - Set the file's last write/modification date and time.</p>
  2117. <dl class="params"><dt>Parameters</dt><dd>
  2118. <table class="params">
  2119. <tr><td class="paramdir">[in]</td><td class="paramname">year</td><td>Valid range 1980 - 2107 inclusive.</td></tr>
  2120. <tr><td class="paramdir">[in]</td><td class="paramname">month</td><td>Valid range 1 - 12 inclusive.</td></tr>
  2121. <tr><td class="paramdir">[in]</td><td class="paramname">day</td><td>Valid range 1 - 31 inclusive.</td></tr>
  2122. <tr><td class="paramdir">[in]</td><td class="paramname">hour</td><td>Valid range 0 - 23 inclusive.</td></tr>
  2123. <tr><td class="paramdir">[in]</td><td class="paramname">minute</td><td>Valid range 0 - 59 inclusive.</td></tr>
  2124. <tr><td class="paramdir">[in]</td><td class="paramname">second</td><td>Valid range 0 - 59 inclusive</td></tr>
  2125. </table>
  2126. </dd>
  2127. </dl>
  2128. <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>
  2129. <dd>
  2130. Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().</dd></dl>
  2131. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  2132. </div>
  2133. </div>
  2134. <a id="a2a0bf00241df08a604f054512746986b"></a>
  2135. <h2 class="memtitle"><span class="permalink"><a href="#a2a0bf00241df08a604f054512746986b">&#9670;&nbsp;</a></span>truncate() <span class="overload">[1/2]</span></h2>
  2136. <div class="memitem">
  2137. <div class="memproto">
  2138. <table class="mlabels">
  2139. <tr>
  2140. <td class="mlabels-left">
  2141. <table class="memname">
  2142. <tr>
  2143. <td class="memname">bool FsBaseFile::truncate </td>
  2144. <td>(</td>
  2145. <td class="paramname"></td><td>)</td>
  2146. <td></td>
  2147. </tr>
  2148. </table>
  2149. </td>
  2150. <td class="mlabels-right">
  2151. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  2152. </tr>
  2153. </table>
  2154. </div><div class="memdoc">
  2155. <p>Truncate a file to the current position.</p>
  2156. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  2157. </div>
  2158. </div>
  2159. <a id="a47247cc54157ef79e0752f55ba01cf7e"></a>
  2160. <h2 class="memtitle"><span class="permalink"><a href="#a47247cc54157ef79e0752f55ba01cf7e">&#9670;&nbsp;</a></span>truncate() <span class="overload">[2/2]</span></h2>
  2161. <div class="memitem">
  2162. <div class="memproto">
  2163. <table class="mlabels">
  2164. <tr>
  2165. <td class="mlabels-left">
  2166. <table class="memname">
  2167. <tr>
  2168. <td class="memname">bool FsBaseFile::truncate </td>
  2169. <td>(</td>
  2170. <td class="paramtype">uint64_t&#160;</td>
  2171. <td class="paramname"><em>length</em></td><td>)</td>
  2172. <td></td>
  2173. </tr>
  2174. </table>
  2175. </td>
  2176. <td class="mlabels-right">
  2177. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  2178. </tr>
  2179. </table>
  2180. </div><div class="memdoc">
  2181. <p>Truncate a file to a specified length. The current file position will be set to end of file.</p>
  2182. <dl class="params"><dt>Parameters</dt><dd>
  2183. <table class="params">
  2184. <tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The desired length for the file.</td></tr>
  2185. </table>
  2186. </dd>
  2187. </dl>
  2188. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  2189. </div>
  2190. </div>
  2191. <a id="a0695220134825199b39dee82f18ab1ec"></a>
  2192. <h2 class="memtitle"><span class="permalink"><a href="#a0695220134825199b39dee82f18ab1ec">&#9670;&nbsp;</a></span>write() <span class="overload">[1/3]</span></h2>
  2193. <div class="memitem">
  2194. <div class="memproto">
  2195. <table class="mlabels">
  2196. <tr>
  2197. <td class="mlabels-left">
  2198. <table class="memname">
  2199. <tr>
  2200. <td class="memname">size_t <a class="el" href="class_stream_file.html">StreamFile</a>&lt; <a class="el" href="class_fs_base_file.html">FsBaseFile</a> , uint64_t &gt;::write </td>
  2201. <td>(</td>
  2202. <td class="paramtype">uint8_t&#160;</td>
  2203. <td class="paramname"><em>b</em></td><td>)</td>
  2204. <td></td>
  2205. </tr>
  2206. </table>
  2207. </td>
  2208. <td class="mlabels-right">
  2209. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  2210. </tr>
  2211. </table>
  2212. </div><div class="memdoc">
  2213. <p>Write a byte to a file. Required by the Arduino Print class. </p><dl class="params"><dt>Parameters</dt><dd>
  2214. <table class="params">
  2215. <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>the byte to be written. Use getWriteError to check for errors. </td></tr>
  2216. </table>
  2217. </dd>
  2218. </dl>
  2219. <dl class="section return"><dt>Returns</dt><dd>1 for success and 0 for failure. </dd></dl>
  2220. </div>
  2221. </div>
  2222. <a id="a0ace3aaaf6d0fb673a43059c0664fab6"></a>
  2223. <h2 class="memtitle"><span class="permalink"><a href="#a0ace3aaaf6d0fb673a43059c0664fab6">&#9670;&nbsp;</a></span>write() <span class="overload">[2/3]</span></h2>
  2224. <div class="memitem">
  2225. <div class="memproto">
  2226. <table class="mlabels">
  2227. <tr>
  2228. <td class="mlabels-left">
  2229. <table class="memname">
  2230. <tr>
  2231. <td class="memname">size_t <a class="el" href="class_stream_file.html">StreamFile</a>&lt; <a class="el" href="class_fs_base_file.html">FsBaseFile</a> , uint64_t &gt;::write </td>
  2232. <td>(</td>
  2233. <td class="paramtype">const uint8_t *&#160;</td>
  2234. <td class="paramname"><em>buffer</em>, </td>
  2235. </tr>
  2236. <tr>
  2237. <td class="paramkey"></td>
  2238. <td></td>
  2239. <td class="paramtype">size_t&#160;</td>
  2240. <td class="paramname"><em>size</em>&#160;</td>
  2241. </tr>
  2242. <tr>
  2243. <td></td>
  2244. <td>)</td>
  2245. <td></td><td></td>
  2246. </tr>
  2247. </table>
  2248. </td>
  2249. <td class="mlabels-right">
  2250. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  2251. </tr>
  2252. </table>
  2253. </div><div class="memdoc">
  2254. <p>Write data to an open file.</p>
  2255. <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_fs_base_file.html#acf2d9261c5c1b1b022a0414cdfe0a17b">sync()</a> is called.</dd></dl>
  2256. <dl class="params"><dt>Parameters</dt><dd>
  2257. <table class="params">
  2258. <tr><td class="paramdir">[in]</td><td class="paramname">buffer</td><td>Pointer to the location of the data to be written.</td></tr>
  2259. <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Number of bytes to write.</td></tr>
  2260. </table>
  2261. </dd>
  2262. </dl>
  2263. <dl class="section return"><dt>Returns</dt><dd>For success <a class="el" href="class_stream_file.html#a0695220134825199b39dee82f18ab1ec">write()</a> returns the number of bytes written, always <em>size</em>. </dd></dl>
  2264. </div>
  2265. </div>
  2266. <a id="aa763e83fea4889828effc3308f13113a"></a>
  2267. <h2 class="memtitle"><span class="permalink"><a href="#aa763e83fea4889828effc3308f13113a">&#9670;&nbsp;</a></span>write() <span class="overload">[3/3]</span></h2>
  2268. <div class="memitem">
  2269. <div class="memproto">
  2270. <table class="mlabels">
  2271. <tr>
  2272. <td class="mlabels-left">
  2273. <table class="memname">
  2274. <tr>
  2275. <td class="memname">size_t FsBaseFile::write </td>
  2276. <td>(</td>
  2277. <td class="paramtype">const void *&#160;</td>
  2278. <td class="paramname"><em>buf</em>, </td>
  2279. </tr>
  2280. <tr>
  2281. <td class="paramkey"></td>
  2282. <td></td>
  2283. <td class="paramtype">size_t&#160;</td>
  2284. <td class="paramname"><em>count</em>&#160;</td>
  2285. </tr>
  2286. <tr>
  2287. <td></td>
  2288. <td>)</td>
  2289. <td></td><td></td>
  2290. </tr>
  2291. </table>
  2292. </td>
  2293. <td class="mlabels-right">
  2294. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  2295. </tr>
  2296. </table>
  2297. </div><div class="memdoc">
  2298. <p>Write data to an open file.</p>
  2299. <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_fs_base_file.html#acf2d9261c5c1b1b022a0414cdfe0a17b">sync()</a> is called.</dd></dl>
  2300. <dl class="params"><dt>Parameters</dt><dd>
  2301. <table class="params">
  2302. <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Pointer to the location of the data to be written.</td></tr>
  2303. <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Number of bytes to write.</td></tr>
  2304. </table>
  2305. </dd>
  2306. </dl>
  2307. <dl class="section return"><dt>Returns</dt><dd>For success <a class="el" href="class_stream_file.html#a0695220134825199b39dee82f18ab1ec">write()</a> returns the number of bytes written, always <em>nbyte</em>. If an error occurs, <a class="el" href="class_stream_file.html#a0695220134825199b39dee82f18ab1ec">write()</a> returns -1. Possible errors include <a class="el" href="class_stream_file.html#a0695220134825199b39dee82f18ab1ec">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>
  2308. </div>
  2309. </div>
  2310. <hr/>The documentation for this class was generated from the following file:<ul>
  2311. <li>ArduinoSdFat/libraries/SdFat/src/FsLib/<a class="el" href="_fs_file_8h.html">FsFile.h</a></li>
  2312. </ul>
  2313. </div><!-- contents -->
  2314. <!-- start footer part -->
  2315. <hr class="footer"/><address class="footer"><small>
  2316. Generated on Thu May 9 2019 06:51:28 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  2317. <img class="footer" src="doxygen.png" alt="doxygen"/>
  2318. </a> 1.8.14
  2319. </small></address>
  2320. </body>
  2321. </html>