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

2808 satır
125KB

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