您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

class_sd_file.html 122KB

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