Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

2354 linhas
105KB

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