You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2716 lines
122 KiB
2716 lines
122 KiB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.10"/>
|
|
<title>SdFs: FatFile Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { init_search(); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">SdFs
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.10 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pub-static-methods">Static Public Member Functions</a> |
|
|
<a href="#friends">Friends</a> |
|
|
<a href="class_fat_file-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">FatFile Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Basic file class.
|
|
<a href="class_fat_file.html#details">More...</a></p>
|
|
|
|
<p><code>#include <FatFile.h></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for FatFile:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="class_fat_file__inherit__graph.png" border="0" usemap="#_fat_file_inherit__map" alt="Inheritance graph"/></div>
|
|
<map name="_fat_file_inherit__map" id="_fat_file_inherit__map">
|
|
<area shape="rect" id="node2" href="class_base_stream.html" title="BaseStream\< FatFile \>" alt="" coords="227,87,385,114"/>
|
|
<area shape="rect" id="node9" href="class_stream_file.html" title="StreamFile\< FatFile,\l uint32_t \>" alt="" coords="482,80,623,121"/>
|
|
<area shape="rect" id="node3" href="classfstream_base.html" title="fstreamBase\< FatFile \>" alt="" coords="5,169,164,196"/>
|
|
<area shape="rect" id="node5" href="classifstream_base.html" title="ifstreamBase\< FatFile \>" alt="" coords="189,169,351,196"/>
|
|
<area shape="rect" id="node7" href="classofstream_base.html" title="ofstreamBase\< FatFile \>" alt="" coords="376,169,543,196"/>
|
|
<area shape="rect" id="node4" href="classfstream.html" title="FAT file input/output stream. " alt="" coords="52,244,117,271"/>
|
|
<area shape="rect" id="node6" href="classifstream.html" title="FAT file input stream. " alt="" coords="236,244,304,271"/>
|
|
<area shape="rect" id="node8" href="classofstream.html" title="FAT file output stream. " alt="" coords="423,244,495,271"/>
|
|
<area shape="rect" id="node10" href="class_file.html" title="FAT16/FAT32 file with Arduino Stream. " alt="" coords="567,169,610,196"/>
|
|
</map>
|
|
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a4baea142c9cd53293a93ef3d6a67aa16"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a4baea142c9cd53293a93ef3d6a67aa16">available</a> ()</td></tr>
|
|
<tr class="separator:a4baea142c9cd53293a93ef3d6a67aa16"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a651ffa37e7e586fc3c2de8cbbd500ea6"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a651ffa37e7e586fc3c2de8cbbd500ea6">available32</a> ()</td></tr>
|
|
<tr class="separator:a651ffa37e7e586fc3c2de8cbbd500ea6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a052e2c15a39b322a5307b693b8835b22"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a052e2c15a39b322a5307b693b8835b22">clearError</a> ()</td></tr>
|
|
<tr class="separator:a052e2c15a39b322a5307b693b8835b22"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aeca2a2eff91e6aa55fe1b0e3860c9a05"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aeca2a2eff91e6aa55fe1b0e3860c9a05">clearWriteError</a> ()</td></tr>
|
|
<tr class="separator:aeca2a2eff91e6aa55fe1b0e3860c9a05"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afd16af325e0642e4bff6430b7d8bb18b"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#afd16af325e0642e4bff6430b7d8bb18b">close</a> ()</td></tr>
|
|
<tr class="separator:afd16af325e0642e4bff6430b7d8bb18b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a12b3c5a763416ca62c70e3db74033cd0"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a12b3c5a763416ca62c70e3db74033cd0">contiguousRange</a> (uint32_t *bgnSector, uint32_t *endSector)</td></tr>
|
|
<tr class="separator:a12b3c5a763416ca62c70e3db74033cd0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a20c55b134bfd1d287a00bf64eba9332e"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a20c55b134bfd1d287a00bf64eba9332e">curPosition</a> () const </td></tr>
|
|
<tr class="separator:a20c55b134bfd1d287a00bf64eba9332e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6858d18c807411a071fd6d1b39d50087"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a6858d18c807411a071fd6d1b39d50087">dirEntry</a> (dir_t *dir)</td></tr>
|
|
<tr class="separator:a6858d18c807411a071fd6d1b39d50087"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4f01d27954ae49aeb6888ac7302f55d9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a4f01d27954ae49aeb6888ac7302f55d9">dmpFile</a> (print_t *pr, uint32_t pos, size_t n)</td></tr>
|
|
<tr class="separator:a4f01d27954ae49aeb6888ac7302f55d9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a50242f98dea0d4488ce4039a279f2a57"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a50242f98dea0d4488ce4039a279f2a57">exists</a> (const char *path)</td></tr>
|
|
<tr class="separator:a50242f98dea0d4488ce4039a279f2a57"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7b591c9b92165fa8e4eae8c30c30e533"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a7b591c9b92165fa8e4eae8c30c30e533">FatFile</a> ()</td></tr>
|
|
<tr class="separator:a7b591c9b92165fa8e4eae8c30c30e533"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a33e0b0a8a342047f29ab8e8aae9cae14"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a33e0b0a8a342047f29ab8e8aae9cae14">fgetpos</a> (fspos_t *pos)</td></tr>
|
|
<tr class="separator:a33e0b0a8a342047f29ab8e8aae9cae14"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a69d86cd3af397b36d0f9ef2bf7b2afab"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a69d86cd3af397b36d0f9ef2bf7b2afab">fgets</a> (char *str, int num, char *delim=<a class="el" href="_sys_call_8h.html#ab979d9d4b4923f7c54d6caa6e1a61936">nullptr</a>)</td></tr>
|
|
<tr class="separator:a69d86cd3af397b36d0f9ef2bf7b2afab"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a02fc3b3ca36b4745f695f3de8c8ec36d"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a02fc3b3ca36b4745f695f3de8c8ec36d">fileSize</a> () const </td></tr>
|
|
<tr class="separator:a02fc3b3ca36b4745f695f3de8c8ec36d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a166b5ff04754cc925f2aee71bf92f800"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a166b5ff04754cc925f2aee71bf92f800">flush</a> ()</td></tr>
|
|
<tr class="separator:a166b5ff04754cc925f2aee71bf92f800"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a42697726ab6a71beb26fd5e6d701b2f4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a42697726ab6a71beb26fd5e6d701b2f4">fsetpos</a> (fspos_t *pos)</td></tr>
|
|
<tr class="separator:a42697726ab6a71beb26fd5e6d701b2f4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad0dbbd083180f44c7a3ce7124d4ce19c"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ad0dbbd083180f44c7a3ce7124d4ce19c">getError</a> ()</td></tr>
|
|
<tr class="separator:ad0dbbd083180f44c7a3ce7124d4ce19c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aafa565e286440aab612cdb430fc01da5"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aafa565e286440aab612cdb430fc01da5">getName</a> (char *name, size_t size)</td></tr>
|
|
<tr class="separator:aafa565e286440aab612cdb430fc01da5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aba30e92a66f8e0d2f815c85662772a58"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aba30e92a66f8e0d2f815c85662772a58">getSFN</a> (char *name)</td></tr>
|
|
<tr class="separator:aba30e92a66f8e0d2f815c85662772a58"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8062c0d3a118e8d77d0310418703d5f5"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a8062c0d3a118e8d77d0310418703d5f5">getWriteError</a> ()</td></tr>
|
|
<tr class="separator:a8062c0d3a118e8d77d0310418703d5f5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aef41d65e0f1ce753d18cc9ed691f7de4"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aef41d65e0f1ce753d18cc9ed691f7de4">isDir</a> () const </td></tr>
|
|
<tr class="separator:aef41d65e0f1ce753d18cc9ed691f7de4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afcf6270ea8d4a3a5f8e89523bc684e22"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#afcf6270ea8d4a3a5f8e89523bc684e22">isFile</a> () const </td></tr>
|
|
<tr class="separator:afcf6270ea8d4a3a5f8e89523bc684e22"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7eefe7408f34b6326f0c6e78af7eb05f"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a7eefe7408f34b6326f0c6e78af7eb05f">isHidden</a> () const </td></tr>
|
|
<tr class="separator:a7eefe7408f34b6326f0c6e78af7eb05f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aed36d17f8fde597b6ed9446faec1f7e3"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aed36d17f8fde597b6ed9446faec1f7e3">isLFN</a> () const </td></tr>
|
|
<tr class="separator:aed36d17f8fde597b6ed9446faec1f7e3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4c8a07b081f04aa25839c6f56c739bdc"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a4c8a07b081f04aa25839c6f56c739bdc">isOpen</a> () const </td></tr>
|
|
<tr class="separator:a4c8a07b081f04aa25839c6f56c739bdc"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ace9b831c9d034506bb9cd38242b270b0"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ace9b831c9d034506bb9cd38242b270b0">isReadable</a> () const </td></tr>
|
|
<tr class="separator:ace9b831c9d034506bb9cd38242b270b0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6872d3acb1e70f81c9c2be2495977583"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a6872d3acb1e70f81c9c2be2495977583">isReadOnly</a> () const </td></tr>
|
|
<tr class="separator:a6872d3acb1e70f81c9c2be2495977583"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa4a206803a4bf8243be20244c1aef4d2"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aa4a206803a4bf8243be20244c1aef4d2">isRoot</a> () const </td></tr>
|
|
<tr class="separator:aa4a206803a4bf8243be20244c1aef4d2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1449b294e3a838396c62e47674ca8cf0"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a1449b294e3a838396c62e47674ca8cf0">isRoot32</a> () const </td></tr>
|
|
<tr class="separator:a1449b294e3a838396c62e47674ca8cf0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8215bd4b21e11ec83fa88ef226ceb06f"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a8215bd4b21e11ec83fa88ef226ceb06f">isRootFixed</a> () const </td></tr>
|
|
<tr class="separator:a8215bd4b21e11ec83fa88ef226ceb06f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a95b503b17442c2b364a2f53de1b2aeba"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a95b503b17442c2b364a2f53de1b2aeba">isSubDir</a> () const </td></tr>
|
|
<tr class="separator:a95b503b17442c2b364a2f53de1b2aeba"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:add932e13e5bf32ad467af6ec34824e3c"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#add932e13e5bf32ad467af6ec34824e3c">isSystem</a> () const </td></tr>
|
|
<tr class="separator:add932e13e5bf32ad467af6ec34824e3c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afa428bb01af189345753ae150b182d98"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#afa428bb01af189345753ae150b182d98">isWritable</a> () const </td></tr>
|
|
<tr class="separator:afa428bb01af189345753ae150b182d98"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad49f688a494b351ccbb0102dcfafb925"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ad49f688a494b351ccbb0102dcfafb925">ls</a> (uint8_t flags=0)</td></tr>
|
|
<tr class="separator:ad49f688a494b351ccbb0102dcfafb925"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:acabf31ff85e696fbf384c49428012fea"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#acabf31ff85e696fbf384c49428012fea">ls</a> (print_t *pr, uint8_t flags=0, uint8_t indent=0)</td></tr>
|
|
<tr class="separator:acabf31ff85e696fbf384c49428012fea"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abab5b9f72cc796388dd4eed01d13d90d"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#abab5b9f72cc796388dd4eed01d13d90d">mkdir</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dir, const char *path, bool pFlag=true)</td></tr>
|
|
<tr class="separator:abab5b9f72cc796388dd4eed01d13d90d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2665bec40eec5a189b222730173ae483"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a2665bec40eec5a189b222730173ae483">mprintf</a> (const char *fmt,...)</td></tr>
|
|
<tr class="separator:a2665bec40eec5a189b222730173ae483"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5c9c8c04617a13d20d5fbbe0f28b0169"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a5c9c8c04617a13d20d5fbbe0f28b0169">mprintf</a> (const __FlashStringHelper *ifsh,...)</td></tr>
|
|
<tr class="separator:a5c9c8c04617a13d20d5fbbe0f28b0169"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a273f6cba99331f7ca44616f7755fea37"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a273f6cba99331f7ca44616f7755fea37">open</a> (<a class="el" href="class_fat_volume.html">FatVolume</a> *vol, const char *path, uint8_t oflag)</td></tr>
|
|
<tr class="separator:a273f6cba99331f7ca44616f7755fea37"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad3fa9daaccb4e4179fb88a8ca037aa80"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ad3fa9daaccb4e4179fb88a8ca037aa80">open</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dirFile, uint16_t index, uint8_t oflag)</td></tr>
|
|
<tr class="separator:ad3fa9daaccb4e4179fb88a8ca037aa80"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a211be757679b18708f6b6a36464e4f61"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a211be757679b18708f6b6a36464e4f61">open</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dirFile, const char *path, uint8_t oflag)</td></tr>
|
|
<tr class="separator:a211be757679b18708f6b6a36464e4f61"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab0e7075062c89f356441f80fc64d03e6"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ab0e7075062c89f356441f80fc64d03e6">open</a> (const char *path, uint8_t oflag=O_READ)</td></tr>
|
|
<tr class="separator:ab0e7075062c89f356441f80fc64d03e6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8034c4649eb0d26715b1a8a69e73d9d0"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a8034c4649eb0d26715b1a8a69e73d9d0">openNext</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dirFile, uint8_t oflag=O_READ)</td></tr>
|
|
<tr class="separator:a8034c4649eb0d26715b1a8a69e73d9d0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7e0c0548fed3a69e7284b91b694439d4"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a7e0c0548fed3a69e7284b91b694439d4">openRoot</a> (<a class="el" href="class_fat_volume.html">FatVolume</a> *vol)</td></tr>
|
|
<tr class="separator:a7e0c0548fed3a69e7284b91b694439d4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:acd141c43d03cf790b3b9806f3b059e77"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#acd141c43d03cf790b3b9806f3b059e77">operator bool</a> ()</td></tr>
|
|
<tr class="separator:acd141c43d03cf790b3b9806f3b059e77"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac05b7136b887539426856c623869aa3a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ac05b7136b887539426856c623869aa3a">peek</a> ()</td></tr>
|
|
<tr class="separator:ac05b7136b887539426856c623869aa3a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aeeb13b9de68bf9097c863c41d655ee83"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aeeb13b9de68bf9097c863c41d655ee83">preAllocate</a> (uint32_t length)</td></tr>
|
|
<tr class="separator:aeeb13b9de68bf9097c863c41d655ee83"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab22396a285e27b53501a0047ddd97f59"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ab22396a285e27b53501a0047ddd97f59">printCreateDateTime</a> (print_t *pr)</td></tr>
|
|
<tr class="separator:ab22396a285e27b53501a0047ddd97f59"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6eedcd3c2818cf33d997895ebd40218c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a6eedcd3c2818cf33d997895ebd40218c">printf</a> (const char *fmt,...)</td></tr>
|
|
<tr class="separator:a6eedcd3c2818cf33d997895ebd40218c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7478cad0f9e5079311b9e1fa558016ff"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a7478cad0f9e5079311b9e1fa558016ff">printField</a> (float value, char term, uint8_t prec=2)</td></tr>
|
|
<tr class="separator:a7478cad0f9e5079311b9e1fa558016ff"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abd3e1747511216462b3ef98167156cbb"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#abd3e1747511216462b3ef98167156cbb">printField</a> (int16_t value, char term)</td></tr>
|
|
<tr class="separator:abd3e1747511216462b3ef98167156cbb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9972c2419c293ef9c382bff666b9ae4d"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a9972c2419c293ef9c382bff666b9ae4d">printField</a> (uint16_t value, char term)</td></tr>
|
|
<tr class="separator:a9972c2419c293ef9c382bff666b9ae4d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a41b3b32dd8482429b74c7af3432d6cf8"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a41b3b32dd8482429b74c7af3432d6cf8">printField</a> (int32_t value, char term)</td></tr>
|
|
<tr class="separator:a41b3b32dd8482429b74c7af3432d6cf8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a097240f08baadeb1c64b63eab9afb088"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a097240f08baadeb1c64b63eab9afb088">printField</a> (uint32_t value, char term)</td></tr>
|
|
<tr class="separator:a097240f08baadeb1c64b63eab9afb088"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a12a5d2de2737c201aa39ca1bd2ab9c47"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a12a5d2de2737c201aa39ca1bd2ab9c47">printFileSize</a> (print_t *pr)</td></tr>
|
|
<tr class="separator:a12a5d2de2737c201aa39ca1bd2ab9c47"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a43c8a1cabcae673e43c590f5db44c65a"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a43c8a1cabcae673e43c590f5db44c65a">printModifyDateTime</a> (print_t *pr)</td></tr>
|
|
<tr class="separator:a43c8a1cabcae673e43c590f5db44c65a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad1cbc3aeb0f5193b7a26595966da9621"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ad1cbc3aeb0f5193b7a26595966da9621">printName</a> ()</td></tr>
|
|
<tr class="separator:ad1cbc3aeb0f5193b7a26595966da9621"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afe18a787fb8640e2d2483370c770f82f"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#afe18a787fb8640e2d2483370c770f82f">printName</a> (print_t *pr)</td></tr>
|
|
<tr class="separator:afe18a787fb8640e2d2483370c770f82f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a791cd7aade71f609aab62ec018aea3c0"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a791cd7aade71f609aab62ec018aea3c0">printSFN</a> (print_t *pr)</td></tr>
|
|
<tr class="separator:a791cd7aade71f609aab62ec018aea3c0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a60ae55ff6fe158c2340071d702a363c5"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a60ae55ff6fe158c2340071d702a363c5">read</a> ()</td></tr>
|
|
<tr class="separator:a60ae55ff6fe158c2340071d702a363c5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aba893af8107a18017482d2311b066187"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aba893af8107a18017482d2311b066187">read</a> (void *buf, size_t count)</td></tr>
|
|
<tr class="separator:aba893af8107a18017482d2311b066187"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1325afe074c3efecff666678cd9f116a"><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a1325afe074c3efecff666678cd9f116a">readDir</a> (dir_t *dir)</td></tr>
|
|
<tr class="separator:a1325afe074c3efecff666678cd9f116a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac837a537fbcca14c7aa390c5fc9f4e7c"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ac837a537fbcca14c7aa390c5fc9f4e7c">remove</a> ()</td></tr>
|
|
<tr class="separator:ac837a537fbcca14c7aa390c5fc9f4e7c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a75d3276f0b02b03e863afafe5731fedb"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a75d3276f0b02b03e863afafe5731fedb">remove</a> (const char *path)</td></tr>
|
|
<tr class="separator:a75d3276f0b02b03e863afafe5731fedb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4cebcac13c1f4c9de7a055ae73133599"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a4cebcac13c1f4c9de7a055ae73133599">rename</a> (const char *newPath)</td></tr>
|
|
<tr class="separator:a4cebcac13c1f4c9de7a055ae73133599"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4b42f2454ff462555c07ea094a92a1e0"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a4b42f2454ff462555c07ea094a92a1e0">rename</a> (<a class="el" href="class_fat_file.html">FatFile</a> *dirFile, const char *newPath)</td></tr>
|
|
<tr class="separator:a4b42f2454ff462555c07ea094a92a1e0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5aac6e0b3cb08fc8b8668e916a8b0ca5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a5aac6e0b3cb08fc8b8668e916a8b0ca5">rewind</a> ()</td></tr>
|
|
<tr class="separator:a5aac6e0b3cb08fc8b8668e916a8b0ca5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9515bac181d33e7f0125e88fa2ccd283"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a9515bac181d33e7f0125e88fa2ccd283">rmdir</a> ()</td></tr>
|
|
<tr class="separator:a9515bac181d33e7f0125e88fa2ccd283"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac780a80526f86d3def701ecdc99d8bfe"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ac780a80526f86d3def701ecdc99d8bfe">rmRfStar</a> ()</td></tr>
|
|
<tr class="separator:ac780a80526f86d3def701ecdc99d8bfe"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5812037ea30777cc350698ad26f2c73f"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a5812037ea30777cc350698ad26f2c73f">seekCur</a> (int32_t offset)</td></tr>
|
|
<tr class="separator:a5812037ea30777cc350698ad26f2c73f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a84f677f4e75ef6fa2eb632f4cdf6b486"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a84f677f4e75ef6fa2eb632f4cdf6b486">seekEnd</a> (int32_t offset=0)</td></tr>
|
|
<tr class="separator:a84f677f4e75ef6fa2eb632f4cdf6b486"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab067190d25733ed7e697d9890f61fd7a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ab067190d25733ed7e697d9890f61fd7a">seekSet</a> (uint32_t pos)</td></tr>
|
|
<tr class="separator:ab067190d25733ed7e697d9890f61fd7a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a67f3dc4896c542d695e11aac927f585e"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a67f3dc4896c542d695e11aac927f585e">sync</a> ()</td></tr>
|
|
<tr class="separator:a67f3dc4896c542d695e11aac927f585e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a56dabdf73833b7e961c4530eb8e16d23"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a56dabdf73833b7e961c4530eb8e16d23">timestamp</a> (uint8_t flags, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)</td></tr>
|
|
<tr class="separator:a56dabdf73833b7e961c4530eb8e16d23"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7dda881dac19ea2aa9b2e85a229a98d7"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a7dda881dac19ea2aa9b2e85a229a98d7">truncate</a> ()</td></tr>
|
|
<tr class="separator:a7dda881dac19ea2aa9b2e85a229a98d7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa6e663098a578635d37d92e82d18d616"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aa6e663098a578635d37d92e82d18d616">truncate</a> (uint32_t length)</td></tr>
|
|
<tr class="separator:aa6e663098a578635d37d92e82d18d616"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a081dd810835f1ebf8c23ffe92706b485"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a081dd810835f1ebf8c23ffe92706b485">write</a> (const char *str)</td></tr>
|
|
<tr class="separator:a081dd810835f1ebf8c23ffe92706b485"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae51e724ac6cc3d67d64a5a666d5850f1"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#ae51e724ac6cc3d67d64a5a666d5850f1">write</a> (uint8_t b)</td></tr>
|
|
<tr class="separator:ae51e724ac6cc3d67d64a5a666d5850f1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5d84d871ac904a22aa48308713d14682"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a5d84d871ac904a22aa48308713d14682">write</a> (const void *buf, size_t count)</td></tr>
|
|
<tr class="separator:a5d84d871ac904a22aa48308713d14682"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
|
|
Static Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a94df8090f16e9666cdc53ca20f6aff90"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a94df8090f16e9666cdc53ca20f6aff90">legal83Char</a> (uint8_t c)</td></tr>
|
|
<tr class="separator:a94df8090f16e9666cdc53ca20f6aff90"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aabcd863883bfcfb37b63dbd6021f7eb8"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#aabcd863883bfcfb37b63dbd6021f7eb8">printFatDate</a> (print_t *pr, uint16_t fatDate)</td></tr>
|
|
<tr class="separator:aabcd863883bfcfb37b63dbd6021f7eb8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7f84d953190ea94710dad9ebb897b957"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_file.html#a7f84d953190ea94710dad9ebb897b957">printFatTime</a> (print_t *pr, uint16_t fatTime)</td></tr>
|
|
<tr class="separator:a7f84d953190ea94710dad9ebb897b957"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
|
|
Friends</h2></td></tr>
|
|
<tr class="memitem:a6ca3f436167f187097347a20ea221555"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6ca3f436167f187097347a20ea221555"></a>
|
|
class </td><td class="memItemRight" valign="bottom"><b>FatVolume</b></td></tr>
|
|
<tr class="separator:a6ca3f436167f187097347a20ea221555"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>Basic file class. </p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" id="a7b591c9b92165fa8e4eae8c30c30e533"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">FatFile::FatFile </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Create an instance. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a class="anchor" id="a4baea142c9cd53293a93ef3d6a67aa16"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::available </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>The number of bytes available from the current position to EOF for normal files. INT_MAX is returned for very large files.</dd></dl>
|
|
<p>available64() is recomended for very large files.</p>
|
|
<p>Zero is returned for directory files. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a651ffa37e7e586fc3c2de8cbbd500ea6"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint32_t FatFile::available32 </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>The number of bytes available from the current position to EOF for normal files. Zero is returned for directory files. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a052e2c15a39b322a5307b693b8835b22"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void FatFile::clearError </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Clear all error bits. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aeca2a2eff91e6aa55fe1b0e3860c9a05"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void FatFile::clearWriteError </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Set writeError to zero </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="afd16af325e0642e4bff6430b7d8bb18b"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::close </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Close a file and force cached data and directory information to be written to the storage device.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a12b3c5a763416ca62c70e3db74033cd0"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::contiguousRange </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t * </td>
|
|
<td class="paramname"><em>bgnSector</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t * </td>
|
|
<td class="paramname"><em>endSector</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Check for contiguous file and return its raw sector range.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">bgnSector</td><td>the first sector address for the file. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">endSector</td><td>the last sector address for the file.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a20c55b134bfd1d287a00bf64eba9332e"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint32_t FatFile::curPosition </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>The current position for a file or directory. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a6858d18c807411a071fd6d1b39d50087"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::dirEntry </td>
|
|
<td>(</td>
|
|
<td class="paramtype">dir_t * </td>
|
|
<td class="paramname"><em>dir</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Return a file's directory entry.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">dir</td><td>Location for return of the file's directory entry.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4f01d27954ae49aeb6888ac7302f55d9"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void FatFile::dmpFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">print_t * </td>
|
|
<td class="paramname"><em>pr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>pos</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>n</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Dump file in Hex </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for list. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>Start position in file. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>number of locations to dump. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a50242f98dea0d4488ce4039a279f2a57"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::exists </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>path</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Test for the existence of a file in a directory</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>Path of the file to be tested for.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>The calling instance must be an open directory file.</p>
|
|
<p>dirFile.exists("TOFIND.TXT") searches for "TOFIND.TXT" in the directory dirFile.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if the file exists. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a33e0b0a8a342047f29ab8e8aae9cae14"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void FatFile::fgetpos </td>
|
|
<td>(</td>
|
|
<td class="paramtype">fspos_t * </td>
|
|
<td class="paramname"><em>pos</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>get position for streams </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pos</td><td>struct to receive position </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a69d86cd3af397b36d0f9ef2bf7b2afab"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::fgets </td>
|
|
<td>(</td>
|
|
<td class="paramtype">char * </td>
|
|
<td class="paramname"><em>str</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>num</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char * </td>
|
|
<td class="paramname"><em>delim</em> = <code><a class="el" href="_sys_call_8h.html#ab979d9d4b4923f7c54d6caa6e1a61936">nullptr</a></code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Get a string from a file.</p>
|
|
<p><a class="el" href="class_fat_file.html#a69d86cd3af397b36d0f9ef2bf7b2afab">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>
|
|
<p><a class="el" href="class_fat_file.html#a69d86cd3af397b36d0f9ef2bf7b2afab">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>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">str</td><td>Pointer to the array where the string is stored. </td></tr>
|
|
<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>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">delim</td><td>Optional set of delimiters. The default is "\n".</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>For success <a class="el" href="class_fat_file.html#a69d86cd3af397b36d0f9ef2bf7b2afab">fgets()</a> returns the length of the string in <em>str</em>. If no data is read, <a class="el" href="class_fat_file.html#a69d86cd3af397b36d0f9ef2bf7b2afab">fgets()</a> returns zero for EOF or -1 if an error occurred. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a02fc3b3ca36b4745f695f3de8c8ec36d"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint32_t FatFile::fileSize </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>The total number of bytes in a file. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a166b5ff04754cc925f2aee71bf92f800"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void FatFile::flush </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Arduino name for <a class="el" href="class_fat_file.html#a67f3dc4896c542d695e11aac927f585e">sync()</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a42697726ab6a71beb26fd5e6d701b2f4"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void FatFile::fsetpos </td>
|
|
<td>(</td>
|
|
<td class="paramtype">fspos_t * </td>
|
|
<td class="paramname"><em>pos</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>set position for streams </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pos</td><td>struct with value for new position </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ad0dbbd083180f44c7a3ce7124d4ce19c"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint8_t FatFile::getError </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>All error bits. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aafa565e286440aab612cdb430fc01da5"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::getName </td>
|
|
<td>(</td>
|
|
<td class="paramtype">char * </td>
|
|
<td class="paramname"><em>name</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>size</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Get a file's name followed by a zero byte.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">name</td><td>An array of characters for the file's name. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The size of the array in bytes. The array must be at least 13 bytes long. The file's name will be truncated if the file's name is too long. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true, is returned for success and the value false, is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aba30e92a66f8e0d2f815c85662772a58"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::getSFN </td>
|
|
<td>(</td>
|
|
<td class="paramtype">char * </td>
|
|
<td class="paramname"><em>name</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Get a file's Short <a class="el" href="class_file.html" title="FAT16/FAT32 file with Arduino Stream. ">File</a> Name followed by a zero byte.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">name</td><td>An array of characters for the file's name. The array must be at least 13 bytes long. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true, is returned for success and the value false, is returned for failure.</dd></dl>
|
|
<p>Copyright (c) 20011-2017 Bill Greiman This file is part of the <a class="el" href="class_sd_fs.html" title="SD file system class for FAT16, FAT32, and exFAT volumes. ">SdFs</a> library for SD memory cards.</p>
|
|
<p>MIT License</p>
|
|
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
|
|
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
|
|
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a8062c0d3a118e8d77d0310418703d5f5"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::getWriteError </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>value of writeError </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aef41d65e0f1ce753d18cc9ed691f7de4"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isDir </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>True if this is a directory. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="afcf6270ea8d4a3a5f8e89523bc684e22"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isFile </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>True if this is a normal file. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a7eefe7408f34b6326f0c6e78af7eb05f"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isHidden </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>True if this is a hidden file. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aed36d17f8fde597b6ed9446faec1f7e3"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isLFN </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>true if this file has a Long <a class="el" href="class_file.html" title="FAT16/FAT32 file with Arduino Stream. ">File</a> Name. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4c8a07b081f04aa25839c6f56c739bdc"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isOpen </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>True if this is an open file/directory. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ace9b831c9d034506bb9cd38242b270b0"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isReadable </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>True file is writable. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a6872d3acb1e70f81c9c2be2495977583"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isReadOnly </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>True if file is read-only </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa4a206803a4bf8243be20244c1aef4d2"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isRoot </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>True if this is the root directory. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a1449b294e3a838396c62e47674ca8cf0"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isRoot32 </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>True if this is the FAT32 root directory. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a8215bd4b21e11ec83fa88ef226ceb06f"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isRootFixed </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>True if this is the FAT12 of FAT16 root directory. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a95b503b17442c2b364a2f53de1b2aeba"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isSubDir </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>True if this is a subdirectory. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="add932e13e5bf32ad467af6ec34824e3c"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isSystem </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>True if this is a system file. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="afa428bb01af189345753ae150b182d98"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::isWritable </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>True file is writable. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a94df8090f16e9666cdc53ca20f6aff90"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static bool FatFile::legal83Char </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>c</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Check for a legal 8.3 character. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>Character to be checked. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true for a legal 8.3 character. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ad49f688a494b351ccbb0102dcfafb925"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void FatFile::ls </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>flags</em> = <code>0</code></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>List directory contents.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">flags</td><td>The inclusive OR of</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>LS_DATE - Print file modification date</p>
|
|
<p>LS_SIZE - Print file size.</p>
|
|
<p>LS_R - Recursive list of subdirectories. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="acabf31ff85e696fbf384c49428012fea"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void FatFile::ls </td>
|
|
<td>(</td>
|
|
<td class="paramtype">print_t * </td>
|
|
<td class="paramname"><em>pr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>flags</em> = <code>0</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>indent</em> = <code>0</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>List directory contents.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for list.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">flags</td><td>The inclusive OR of</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>LS_DATE - Print file modification date</p>
|
|
<p>LS_SIZE - Print file size.</p>
|
|
<p>LS_R - Recursive list of subdirectories.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<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>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="abab5b9f72cc796388dd4eed01d13d90d"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::mkdir </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> * </td>
|
|
<td class="paramname"><em>dir</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>path</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>pFlag</em> = <code>true</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Make a new directory.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">dir</td><td>An open <a class="el" href="class_fat_file.html" title="Basic file class. ">FatFile</a> instance for the directory that will contain the new directory.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path with a valid name for the new directory.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pFlag</td><td>Create missing parent directories if true.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2665bec40eec5a189b222730173ae483"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::mprintf </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>fmt</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>...</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Formatted print.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">fmt</td><td>format string.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a5c9c8c04617a13d20d5fbbe0f28b0169"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::mprintf </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const __FlashStringHelper * </td>
|
|
<td class="paramname"><em>ifsh</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>...</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Minimal formatted print.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">ifsh</td><td>format string in flash using <a class="el" href="_sys_call_8h.html#a0e3009529aac180ed5f48296d6670d6b">F()</a> macro.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a273f6cba99331f7ca44616f7755fea37"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::open </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_fat_volume.html">FatVolume</a> * </td>
|
|
<td class="paramname"><em>vol</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>path</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>oflag</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Open a file in the volume root directory.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">vol</td><td>Volume where the file is located.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>with a valid name for a file to be opened.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>bitwise-inclusive OR of open mode flags. See see <a class="el" href="class_fat_file.html#a211be757679b18708f6b6a36464e4f61">FatFile::open(FatFile*, const char*, uint8_t)</a>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ad3fa9daaccb4e4179fb88a8ca037aa80"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::open </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> * </td>
|
|
<td class="paramname"><em>dirFile</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>index</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>oflag</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Open a file by index.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">dirFile</td><td>An open <a class="el" href="class_fat_file.html" title="Basic file class. ">FatFile</a> instance for the directory.</td></tr>
|
|
<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>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>bitwise-inclusive OR of open mode flags. See see <a class="el" href="class_fat_file.html#a211be757679b18708f6b6a36464e4f61">FatFile::open(FatFile*, const char*, uint8_t)</a>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>See <a class="el" href="class_fat_file.html#a273f6cba99331f7ca44616f7755fea37">open()</a> by path for definition of flags. </p><dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a211be757679b18708f6b6a36464e4f61"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::open </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> * </td>
|
|
<td class="paramname"><em>dirFile</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>path</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>oflag</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Open a file or directory by name.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">dirFile</td><td>An open <a class="el" href="class_fat_file.html" title="Basic file class. ">FatFile</a> instance for the directory containing the file to be opened.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path with a valid name for a file to be opened.</td></tr>
|
|
<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>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>O_READ - Open for reading.</p>
|
|
<p>O_RDONLY - Same as O_READ.</p>
|
|
<p>O_WRITE - Open for writing.</p>
|
|
<p>O_WRONLY - Same as O_WRITE.</p>
|
|
<p>O_RDWR - Open for reading and writing.</p>
|
|
<p>O_APPEND - If set, the file offset shall be set to the end of the file prior to each write.</p>
|
|
<p>O_AT_END - Set the initial position at the end of the file.</p>
|
|
<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>
|
|
<p>O_EXCL - If O_CREAT and O_EXCL are set, <a class="el" href="class_fat_file.html#a273f6cba99331f7ca44616f7755fea37">open()</a> shall fail if the file exists.</p>
|
|
<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>
|
|
<p>WARNING: A given file must not be opened by more than one <a class="el" href="class_fat_file.html" title="Basic file class. ">FatFile</a> object or file corruption may occur.</p>
|
|
<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>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ab0e7075062c89f356441f80fc64d03e6"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::open </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>path</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>oflag</em> = <code>O_READ</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Open a file in the current working volume.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path with a valid name for a file to be opened.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>bitwise-inclusive OR of open mode flags. See see <a class="el" href="class_fat_file.html#a211be757679b18708f6b6a36464e4f61">FatFile::open(FatFile*, const char*, uint8_t)</a>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a8034c4649eb0d26715b1a8a69e73d9d0"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::openNext </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> * </td>
|
|
<td class="paramname"><em>dirFile</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>oflag</em> = <code>O_READ</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Open the next file or subdirectory in a directory.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">dirFile</td><td>An open <a class="el" href="class_fat_file.html" title="Basic file class. ">FatFile</a> instance for the directory containing the file to be opened.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>bitwise-inclusive OR of open mode flags. See see <a class="el" href="class_fat_file.html#a211be757679b18708f6b6a36464e4f61">FatFile::open(FatFile*, const char*, uint8_t)</a>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a7e0c0548fed3a69e7284b91b694439d4"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::openRoot </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_fat_volume.html">FatVolume</a> * </td>
|
|
<td class="paramname"><em>vol</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Open a volume's root directory.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">vol</td><td>The FAT volume containing the root directory to be opened.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="acd141c43d03cf790b3b9806f3b059e77"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">FatFile::operator bool </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>The parenthesis operator.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>true if a file is open. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac05b7136b887539426856c623869aa3a"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::peek </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Return the next available byte without consuming it.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The byte if no error and not at eof else -1; </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aeeb13b9de68bf9097c863c41d655ee83"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::preAllocate </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>length</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Allocate contiguous clusters to an empty file.</p>
|
|
<p>The file must be empty with no clusters allocated.</p>
|
|
<p>The file will contain uninitialized data.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>size of the file in bytes. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true for success else false. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ab22396a285e27b53501a0047ddd97f59"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t FatFile::printCreateDateTime </td>
|
|
<td>(</td>
|
|
<td class="paramtype">print_t * </td>
|
|
<td class="paramname"><em>pr</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a file's creation date and time</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The number of bytes printed. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a6eedcd3c2818cf33d997895ebd40218c"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::printf </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>fmt</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>...</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Formatted print.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">fmt</td><td>format string.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aabcd863883bfcfb37b63dbd6021f7eb8"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static void FatFile::printFatDate </td>
|
|
<td>(</td>
|
|
<td class="paramtype">print_t * </td>
|
|
<td class="paramname"><em>pr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>fatDate</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a directory date field.</p>
|
|
<p>Format is yyyy-mm-dd.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">fatDate</td><td>The date field from a directory entry. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a7f84d953190ea94710dad9ebb897b957"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static void FatFile::printFatTime </td>
|
|
<td>(</td>
|
|
<td class="paramtype">print_t * </td>
|
|
<td class="paramname"><em>pr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>fatTime</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a directory time field.</p>
|
|
<p>Format is hh:mm:ss.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">fatTime</td><td>The time field from a directory entry. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a7478cad0f9e5079311b9e1fa558016ff"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::printField </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>value</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char </td>
|
|
<td class="paramname"><em>term</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>prec</em> = <code>2</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">prec</td><td>Number of digits after decimal point. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="abd3e1747511216462b3ef98167156cbb"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::printField </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int16_t </td>
|
|
<td class="paramname"><em>value</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char </td>
|
|
<td class="paramname"><em>term</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a9972c2419c293ef9c382bff666b9ae4d"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::printField </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>value</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char </td>
|
|
<td class="paramname"><em>term</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a41b3b32dd8482429b74c7af3432d6cf8"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::printField </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int32_t </td>
|
|
<td class="paramname"><em>value</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char </td>
|
|
<td class="paramname"><em>term</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a097240f08baadeb1c64b63eab9afb088"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::printField </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>value</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char </td>
|
|
<td class="paramname"><em>term</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a number followed by a field terminator. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The number to be printed. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">term</td><td>The field terminator. Use '\n' for CR LF. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written or -1 if an error occurs. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a12a5d2de2737c201aa39ca1bd2ab9c47"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t FatFile::printFileSize </td>
|
|
<td>(</td>
|
|
<td class="paramtype">print_t * </td>
|
|
<td class="paramname"><em>pr</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a file's size.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The number of characters printed is returned for success and zero is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a43c8a1cabcae673e43c590f5db44c65a"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t FatFile::printModifyDateTime </td>
|
|
<td>(</td>
|
|
<td class="paramtype">print_t * </td>
|
|
<td class="paramname"><em>pr</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a file's modify date and time</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The number of characters printed. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ad1cbc3aeb0f5193b7a26595966da9621"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t FatFile::printName </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a file's name.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="afe18a787fb8640e2d2483370c770f82f"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t FatFile::printName </td>
|
|
<td>(</td>
|
|
<td class="paramtype">print_t * </td>
|
|
<td class="paramname"><em>pr</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a file's name</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a791cd7aade71f609aab62ec018aea3c0"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t FatFile::printSFN </td>
|
|
<td>(</td>
|
|
<td class="paramtype">print_t * </td>
|
|
<td class="paramname"><em>pr</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Print a file's Short <a class="el" href="class_file.html" title="FAT16/FAT32 file with Arduino Stream. ">File</a> Name.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pr</td><td>Print stream for output.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The number of characters printed is returned for success and zero is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a60ae55ff6fe158c2340071d702a363c5"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::read </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Read the next byte from a file.</p>
|
|
<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>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aba893af8107a18017482d2311b066187"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int FatFile::read </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"><em>buf</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>count</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Read data from a file starting at the current position.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Pointer to the location that will receive the data.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Maximum number of bytes to read.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>For success <a class="el" href="class_fat_file.html#a60ae55ff6fe158c2340071d702a363c5">read()</a> returns the number of bytes read. A value less than <em>nbyte</em>, including zero, will be returned if end of file is reached. If an error occurs, <a class="el" href="class_fat_file.html#a60ae55ff6fe158c2340071d702a363c5">read()</a> returns -1. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a1325afe074c3efecff666678cd9f116a"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int8_t FatFile::readDir </td>
|
|
<td>(</td>
|
|
<td class="paramtype">dir_t * </td>
|
|
<td class="paramname"><em>dir</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Read the next directory entry from a directory file.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">dir</td><td>The dir_t struct that will receive the data.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>For success <a class="el" href="class_fat_file.html#a1325afe074c3efecff666678cd9f116a">readDir()</a> returns the number of bytes read. A value of zero will be returned if end of file is reached. If an error occurs, <a class="el" href="class_fat_file.html#a1325afe074c3efecff666678cd9f116a">readDir()</a> returns -1. Possible errors include <a class="el" href="class_fat_file.html#a1325afe074c3efecff666678cd9f116a">readDir()</a> called before a directory has been opened, this is not a directory file or an I/O error occurred. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac837a537fbcca14c7aa390c5fc9f4e7c"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::remove </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Remove a file.</p>
|
|
<p>The directory entry and all data for the file are deleted.</p>
|
|
<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>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a75d3276f0b02b03e863afafe5731fedb"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::remove </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>path</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Remove a file.</p>
|
|
<p>The directory entry and all data for the file are deleted.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>Path for the file to be removed.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>Example use: dirFile.remove(filenameToRemove);</p>
|
|
<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>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4cebcac13c1f4c9de7a055ae73133599"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::rename </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>newPath</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Rename a file or subdirectory.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">newPath</td><td>New path name for the file/directory.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4b42f2454ff462555c07ea094a92a1e0"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::rename </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_fat_file.html">FatFile</a> * </td>
|
|
<td class="paramname"><em>dirFile</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>newPath</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Rename a file or subdirectory.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">dirFile</td><td>Directory for the new path. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">newPath</td><td>New path name for the file/directory.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a5aac6e0b3cb08fc8b8668e916a8b0ca5"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void FatFile::rewind </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Set the file's current position to zero. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a9515bac181d33e7f0125e88fa2ccd283"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::rmdir </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Remove a directory file.</p>
|
|
<p>The directory file will be removed only if it is empty and is not the root directory. <a class="el" href="class_fat_file.html#a9515bac181d33e7f0125e88fa2ccd283">rmdir()</a> follows DOS and Windows and ignores the read-only attribute for the directory.</p>
|
|
<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>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac780a80526f86d3def701ecdc99d8bfe"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::rmRfStar </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Recursively delete a directory and all contained files.</p>
|
|
<p>This is like the Unix/Linux 'rm -rf *' if called with the root directory hence the name.</p>
|
|
<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>
|
|
<dl class="section note"><dt>Note</dt><dd>This function should not be used to delete the 8.3 version of a directory that has a long name. See <a class="el" href="class_fat_file.html#ac837a537fbcca14c7aa390c5fc9f4e7c">remove()</a> and <a class="el" href="class_fat_file.html#a9515bac181d33e7f0125e88fa2ccd283">rmdir()</a>.</dd></dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a5812037ea30777cc350698ad26f2c73f"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::seekCur </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int32_t </td>
|
|
<td class="paramname"><em>offset</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Set the files position to current position + <em>pos</em>. See <a class="el" href="class_fat_file.html#ab067190d25733ed7e697d9890f61fd7a">seekSet()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>The new position in bytes from the current position. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a84f677f4e75ef6fa2eb632f4cdf6b486"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::seekEnd </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int32_t </td>
|
|
<td class="paramname"><em>offset</em> = <code>0</code></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Set the files position to end-of-file + <em>offset</em>. See <a class="el" href="class_fat_file.html#ab067190d25733ed7e697d9890f61fd7a">seekSet()</a>. Can't be used for directory files since file size is not defined. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>The new position in bytes from end-of-file. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ab067190d25733ed7e697d9890f61fd7a"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::seekSet </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>pos</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Sets a file's position.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<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>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a67f3dc4896c542d695e11aac927f585e"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::sync </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>The <a class="el" href="class_fat_file.html#a67f3dc4896c542d695e11aac927f585e">sync()</a> call causes all modified data and directory fields to be written to the storage device.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a56dabdf73833b7e961c4530eb8e16d23"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::timestamp </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>flags</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>year</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>month</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>day</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>hour</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>minute</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>second</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Set a file's timestamps in its directory entry.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<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>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>T_ACCESS - Set the file's last access date.</p>
|
|
<p>T_CREATE - Set the file's creation date and time.</p>
|
|
<p>T_WRITE - Set the file's last write/modification date and time.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">year</td><td>Valid range 1980 - 2107 inclusive.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">month</td><td>Valid range 1 - 12 inclusive.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">day</td><td>Valid range 1 - 31 inclusive.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">hour</td><td>Valid range 0 - 23 inclusive.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">minute</td><td>Valid range 0 - 59 inclusive.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">second</td><td>Valid range 0 - 59 inclusive</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<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>
|
|
<dd>
|
|
Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().</dd></dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a7dda881dac19ea2aa9b2e85a229a98d7"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::truncate </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Truncate a file at 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>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa6e663098a578635d37d92e82d18d616"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool FatFile::truncate </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>length</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Truncate a file to a specified length. The current file position will be set to end of file.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The desired length for the file.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a081dd810835f1ebf8c23ffe92706b485"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t FatFile::write </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>str</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Write a string to a file. Used by the Arduino Print class. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">str</td><td>Pointer to the string. Use getWriteError to check for errors. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>count of characters written for success or -1 for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ae51e724ac6cc3d67d64a5a666d5850f1"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t FatFile::write </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>b</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Write a single byte. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>The byte to be written. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>+1 for success or -1 for failure. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a5d84d871ac904a22aa48308713d14682"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t FatFile::write </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const void * </td>
|
|
<td class="paramname"><em>buf</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>count</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Write data to an open file.</p>
|
|
<dl class="section note"><dt>Note</dt><dd>Data is moved to the cache but may not be written to the storage device until <a class="el" href="class_fat_file.html#a67f3dc4896c542d695e11aac927f585e">sync()</a> is called.</dd></dl>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Pointer to the location of the data to be written.</td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Number of bytes to write.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>For success <a class="el" href="class_fat_file.html#a081dd810835f1ebf8c23ffe92706b485">write()</a> returns the number of bytes written, always <em>count</em>. If an error occurs, <a class="el" href="class_fat_file.html#a081dd810835f1ebf8c23ffe92706b485">write()</a> returns -1. Possible errors include <a class="el" href="class_fat_file.html#a081dd810835f1ebf8c23ffe92706b485">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>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following files:<ul>
|
|
<li>ArduinoSdFs/libraries/SdFs/src/FatLib/<a class="el" href="_fat_file_8h.html">FatFile.h</a></li>
|
|
<li>ArduinoSdFs/libraries/SdFs/src/FatLib/FatFile.cpp</li>
|
|
<li>ArduinoSdFs/libraries/SdFs/src/FatLib/FatFileLFN.cpp</li>
|
|
<li>ArduinoSdFs/libraries/SdFs/src/FatLib/FatFilePrint.cpp</li>
|
|
<li>ArduinoSdFs/libraries/SdFs/src/FatLib/FatFileSFN.cpp</li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Fri Sep 1 2017 03:20:54 for SdFs by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.10
|
|
</small></address>
|
|
</body>
|
|
</html>
|
|
|