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.
1770 lines
77 KiB
1770 lines
77 KiB
5 years ago
|
<!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: FsFile 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="class_fs_file-members.html">List of all members</a> </div>
|
||
|
<div class="headertitle">
|
||
|
<div class="title">FsFile Class Reference</div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
|
||
|
<p><a class="el" href="class_fs_file.html" title="FsFile class. ">FsFile</a> class.
|
||
|
<a href="class_fs_file.html#details">More...</a></p>
|
||
|
|
||
|
<p><code>#include <FsFile.h></code></p>
|
||
|
<div class="dynheader">
|
||
|
Inheritance diagram for FsFile:</div>
|
||
|
<div class="dyncontent">
|
||
|
<div class="center"><img src="class_fs_file__inherit__graph.png" border="0" usemap="#_fs_file_inherit__map" alt="Inheritance graph"/></div>
|
||
|
<map name="_fs_file_inherit__map" id="_fs_file_inherit__map">
|
||
|
</map>
|
||
|
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
|
||
|
<div class="dynheader">
|
||
|
Collaboration diagram for FsFile:</div>
|
||
|
<div class="dyncontent">
|
||
|
<div class="center"><img src="class_fs_file__coll__graph.png" border="0" usemap="#_fs_file_coll__map" alt="Collaboration graph"/></div>
|
||
|
<map name="_fs_file_coll__map" id="_fs_file_coll__map">
|
||
|
</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:ad4553b31fca35d212e98acf542434cb7"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ad4553b31fca35d212e98acf542434cb7">available</a> ()</td></tr>
|
||
|
<tr class="separator:ad4553b31fca35d212e98acf542434cb7"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a39e7ebea1afdb6da5ff460a2b5514eda"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a39e7ebea1afdb6da5ff460a2b5514eda">close</a> ()</td></tr>
|
||
|
<tr class="separator:a39e7ebea1afdb6da5ff460a2b5514eda"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:aa6072569d56a0f80dc0cf21cbbab3154"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#aa6072569d56a0f80dc0cf21cbbab3154">curPosition</a> ()</td></tr>
|
||
|
<tr class="separator:aa6072569d56a0f80dc0cf21cbbab3154"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:aef2f1cdd60fcf77f258686712d9b3ca8"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#aef2f1cdd60fcf77f258686712d9b3ca8">exists</a> (const char *path)</td></tr>
|
||
|
<tr class="separator:aef2f1cdd60fcf77f258686712d9b3ca8"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a5cb3b795bd7145df456b99258278a313"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a5cb3b795bd7145df456b99258278a313">fgets</a> (char *str, int num, char *delim=<a class="el" href="_sys_call_8h.html#ab979d9d4b4923f7c54d6caa6e1a61936">nullptr</a>)</td></tr>
|
||
|
<tr class="separator:a5cb3b795bd7145df456b99258278a313"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a3b2ad9659ec0b6fcaf8d66b2a63e4b0a"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a3b2ad9659ec0b6fcaf8d66b2a63e4b0a">fileSize</a> ()</td></tr>
|
||
|
<tr class="separator:a3b2ad9659ec0b6fcaf8d66b2a63e4b0a"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a3f745cdae518481af4f2521a5f14968a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a3f745cdae518481af4f2521a5f14968a">flush</a> ()</td></tr>
|
||
|
<tr class="separator:a3f745cdae518481af4f2521a5f14968a"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ad085825c8b43f0899b09f00d9f868105"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ad085825c8b43f0899b09f00d9f868105">FsFile</a> (const <a class="el" href="class_fs_file.html">FsFile</a> &from)</td></tr>
|
||
|
<tr class="separator:ad085825c8b43f0899b09f00d9f868105"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a42e9cfd4b5aa8135b98efd54a1962b5e"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a42e9cfd4b5aa8135b98efd54a1962b5e">getName</a> (char *<a class="el" href="class_fs_file.html#a45a33cf3d80a6a2cad564f00fbdf2bba">name</a>, size_t len)</td></tr>
|
||
|
<tr class="separator:a42e9cfd4b5aa8135b98efd54a1962b5e"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:aa3f0e5c34ec12eb24b5c45c564fdfbac"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#aa3f0e5c34ec12eb24b5c45c564fdfbac">isDir</a> ()</td></tr>
|
||
|
<tr class="separator:aa3f0e5c34ec12eb24b5c45c564fdfbac"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:aff4fcf3b043f021753c1b9b2ca8ca878"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#aff4fcf3b043f021753c1b9b2ca8ca878">isDirectory</a> ()</td></tr>
|
||
|
<tr class="separator:aff4fcf3b043f021753c1b9b2ca8ca878"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a98a3692f7e75dae6c4cc92d75ef0e3f6"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a98a3692f7e75dae6c4cc92d75ef0e3f6">isHidden</a> ()</td></tr>
|
||
|
<tr class="separator:a98a3692f7e75dae6c4cc92d75ef0e3f6"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ad89dfb5b0aa218d399c6d903f533e4b8"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ad89dfb5b0aa218d399c6d903f533e4b8">isOpen</a> ()</td></tr>
|
||
|
<tr class="separator:ad89dfb5b0aa218d399c6d903f533e4b8"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ae0e388357a638b2e9190692e3e484d28"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ae0e388357a638b2e9190692e3e484d28">ls</a> (uint8_t flags)</td></tr>
|
||
|
<tr class="separator:ae0e388357a638b2e9190692e3e484d28"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:aec4985bdff278df9b992cc6ba1bb8780"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#aec4985bdff278df9b992cc6ba1bb8780">ls</a> ()</td></tr>
|
||
|
<tr class="separator:aec4985bdff278df9b992cc6ba1bb8780"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:acebe374e1381d48c49026a641de56d85"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#acebe374e1381d48c49026a641de56d85">ls</a> (print_t *pr)</td></tr>
|
||
|
<tr class="separator:acebe374e1381d48c49026a641de56d85"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ad9bb9e55706a5917053d7fa162386c17"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ad9bb9e55706a5917053d7fa162386c17">ls</a> (print_t *pr, uint8_t flags)</td></tr>
|
||
|
<tr class="separator:ad9bb9e55706a5917053d7fa162386c17"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:aafcef0c6410a51692a8d47f8714669a9"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#aafcef0c6410a51692a8d47f8714669a9">mkdir</a> (<a class="el" href="class_fs_file.html">FsFile</a> *dir, const char *path, bool pFlag=true)</td></tr>
|
||
|
<tr class="separator:aafcef0c6410a51692a8d47f8714669a9"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a45a33cf3d80a6a2cad564f00fbdf2bba"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a45a33cf3d80a6a2cad564f00fbdf2bba">name</a> () const </td></tr>
|
||
|
<tr class="separator:a45a33cf3d80a6a2cad564f00fbdf2bba"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:aca1b69e44e2370a2854260027199c482"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#aca1b69e44e2370a2854260027199c482">open</a> (<a class="el" href="class_fs_file.html">FsFile</a> *dir, const char *path, uint8_t oflag=O_READ)</td></tr>
|
||
|
<tr class="separator:aca1b69e44e2370a2854260027199c482"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ae9f8af9b2c6678c7584f72699762af02"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ae9f8af9b2c6678c7584f72699762af02">open</a> (<a class="el" href="class_fs_volume.html">FsVolume</a> *vol, const char *path, uint8_t oflag)</td></tr>
|
||
|
<tr class="separator:ae9f8af9b2c6678c7584f72699762af02"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ada89c7e32e47fa98d248071af673bd7a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ada89c7e32e47fa98d248071af673bd7a">open</a> (const char *path, uint8_t oflag=O_READ)</td></tr>
|
||
|
<tr class="separator:ada89c7e32e47fa98d248071af673bd7a"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a3d3c44f8d1a661b8b00561610ab27437"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a3d3c44f8d1a661b8b00561610ab27437">openNext</a> (<a class="el" href="class_fs_file.html">FsFile</a> *dir, uint8_t oflag=O_READ)</td></tr>
|
||
|
<tr class="separator:a3d3c44f8d1a661b8b00561610ab27437"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:aa985c47806ef8a57589b82a71b593a37"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#aa985c47806ef8a57589b82a71b593a37">operator bool</a> ()</td></tr>
|
||
|
<tr class="separator:aa985c47806ef8a57589b82a71b593a37"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a1d6aedaa6a96b5c27fbe006da83287be"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_fs_file.html">FsFile</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a1d6aedaa6a96b5c27fbe006da83287be">operator=</a> (const <a class="el" href="class_fs_file.html">FsFile</a> &from)</td></tr>
|
||
|
<tr class="separator:a1d6aedaa6a96b5c27fbe006da83287be"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ad2ff91b86bc73c280b8ff96a80551bdf"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ad2ff91b86bc73c280b8ff96a80551bdf">peek</a> ()</td></tr>
|
||
|
<tr class="separator:ad2ff91b86bc73c280b8ff96a80551bdf"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a9530e4383120004bce72590f0ce8af32"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a9530e4383120004bce72590f0ce8af32">position</a> ()</td></tr>
|
||
|
<tr class="separator:a9530e4383120004bce72590f0ce8af32"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a7319a7b532b60ecc0fd11de380db3a1e"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a7319a7b532b60ecc0fd11de380db3a1e">preAllocate</a> (uint64_t length)</td></tr>
|
||
|
<tr class="separator:a7319a7b532b60ecc0fd11de380db3a1e"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:aa43303010dca2d82e3e9423cf692a38f"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#aa43303010dca2d82e3e9423cf692a38f">printFileSize</a> (print_t *pr)</td></tr>
|
||
|
<tr class="separator:aa43303010dca2d82e3e9423cf692a38f"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ae775cd32a8a3e5ed4084f5a13150c1c8"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ae775cd32a8a3e5ed4084f5a13150c1c8">printModifyDateTime</a> (print_t *pr)</td></tr>
|
||
|
<tr class="separator:ae775cd32a8a3e5ed4084f5a13150c1c8"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a709b332e1a880aaf60e5096e74afdac2"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a709b332e1a880aaf60e5096e74afdac2">printName</a> (print_t *pr)</td></tr>
|
||
|
<tr class="separator:a709b332e1a880aaf60e5096e74afdac2"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ae956843999a0e679d6a420ab7f25910e"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ae956843999a0e679d6a420ab7f25910e">read</a> ()</td></tr>
|
||
|
<tr class="separator:ae956843999a0e679d6a420ab7f25910e"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a5a6d7a8c18a4bea95c46ba443f78c681"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a5a6d7a8c18a4bea95c46ba443f78c681">read</a> (void *buf, size_t count)</td></tr>
|
||
|
<tr class="separator:a5a6d7a8c18a4bea95c46ba443f78c681"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a7754ef77a321062761e4f7477aafdc10"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a7754ef77a321062761e4f7477aafdc10">remove</a> ()</td></tr>
|
||
|
<tr class="separator:a7754ef77a321062761e4f7477aafdc10"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a9adf8feef0f7e5d19a2cfbb797a89398"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a9adf8feef0f7e5d19a2cfbb797a89398">remove</a> (const char *path)</td></tr>
|
||
|
<tr class="separator:a9adf8feef0f7e5d19a2cfbb797a89398"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:affc3e1a76b934c40d533ac6d324df652"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#affc3e1a76b934c40d533ac6d324df652">rename</a> (const char *newPath)</td></tr>
|
||
|
<tr class="separator:affc3e1a76b934c40d533ac6d324df652"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a39fad32a17c96d026af206126abb3526"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a39fad32a17c96d026af206126abb3526">rename</a> (<a class="el" href="class_fs_file.html">FsFile</a> *dirFile, const char *newPath)</td></tr>
|
||
|
<tr class="separator:a39fad32a17c96d026af206126abb3526"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a26397329f1dd09da9d4c4d455226e8ab"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a26397329f1dd09da9d4c4d455226e8ab">rewind</a> ()</td></tr>
|
||
|
<tr class="separator:a26397329f1dd09da9d4c4d455226e8ab"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a18ac1a450b0381ee26da6868d32ce864"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a18ac1a450b0381ee26da6868d32ce864">rewindDirectory</a> ()</td></tr>
|
||
|
<tr class="separator:a18ac1a450b0381ee26da6868d32ce864"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ae7c1d191a789a5cd1051dde09b4bf0c0"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ae7c1d191a789a5cd1051dde09b4bf0c0">rmdir</a> ()</td></tr>
|
||
|
<tr class="separator:ae7c1d191a789a5cd1051dde09b4bf0c0"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:aecf174b40f5477b6369bcd29b999b944"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#aecf174b40f5477b6369bcd29b999b944">seek</a> (uint64_t pos)</td></tr>
|
||
|
<tr class="separator:aecf174b40f5477b6369bcd29b999b944"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a7936ebe47525bb5d82fd2970774f2a63"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a7936ebe47525bb5d82fd2970774f2a63">seekCur</a> (int64_t offset)</td></tr>
|
||
|
<tr class="separator:a7936ebe47525bb5d82fd2970774f2a63"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:acaed959183e0461adb93f7778cb4ebd7"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#acaed959183e0461adb93f7778cb4ebd7">seekEnd</a> (int64_t offset=0)</td></tr>
|
||
|
<tr class="separator:acaed959183e0461adb93f7778cb4ebd7"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ad8315a40e05580de98f8f2d9d283b12e"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#ad8315a40e05580de98f8f2d9d283b12e">seekSet</a> (uint64_t pos)</td></tr>
|
||
|
<tr class="separator:ad8315a40e05580de98f8f2d9d283b12e"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a57158f8c85852a0b56601db9663450ed"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a57158f8c85852a0b56601db9663450ed">size</a> ()</td></tr>
|
||
|
<tr class="separator:a57158f8c85852a0b56601db9663450ed"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a490b2b9e72903db050d256f6b4f707e3"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a490b2b9e72903db050d256f6b4f707e3">sync</a> ()</td></tr>
|
||
|
<tr class="separator:a490b2b9e72903db050d256f6b4f707e3"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:aac1c3490a8d01c142ffc8b735cb44c10"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#aac1c3490a8d01c142ffc8b735cb44c10">truncate</a> ()</td></tr>
|
||
|
<tr class="separator:aac1c3490a8d01c142ffc8b735cb44c10"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a234d3fde11828e6811cd99dfb55dbfdf"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a234d3fde11828e6811cd99dfb55dbfdf">truncate</a> (uint64_t length)</td></tr>
|
||
|
<tr class="separator:a234d3fde11828e6811cd99dfb55dbfdf"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a93df37a0354be9e1b0a37a07a66dfa25"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a93df37a0354be9e1b0a37a07a66dfa25">write</a> (uint8_t b)</td></tr>
|
||
|
<tr class="separator:a93df37a0354be9e1b0a37a07a66dfa25"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a4146400a1e38a0a5bd9360e5a5eaefa0"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fs_file.html#a4146400a1e38a0a5bd9360e5a5eaefa0">write</a> (const void *buf, size_t count)</td></tr>
|
||
|
<tr class="separator:a4146400a1e38a0a5bd9360e5a5eaefa0"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
</table>
|
||
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||
|
<div class="textblock"><p><a class="el" href="class_fs_file.html" title="FsFile class. ">FsFile</a> class. </p>
|
||
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||
|
<a class="anchor" id="ad085825c8b43f0899b09f00d9f868105"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">FsFile::FsFile </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">const <a class="el" href="class_fs_file.html">FsFile</a> & </td>
|
||
|
<td class="paramname"><em>from</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>Copy constructor.</p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramdir">[in]</td><td class="paramname">from</td><td>Object used to initialize this instance.</td></tr>
|
||
|
</table>
|
||
|
</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>
|
||
|
<h2 class="groupheader">Member Function Documentation</h2>
|
||
|
<a class="anchor" id="ad4553b31fca35d212e98acf542434cb7"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int FsFile::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>number of bytes available from the current position to EOF or INT_MAX if more than INT_MAX bytes are available. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a39e7ebea1afdb6da5ff460a2b5514eda"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::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="aa6072569d56a0f80dc0cf21cbbab3154"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">uint64_t FsFile::curPosition </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 current position for a file or directory. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="aef2f1cdd60fcf77f258686712d9b3ca8"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::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 else false. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a5cb3b795bd7145df456b99258278a313"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int FsFile::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>
|
||
|
</td>
|
||
|
<td class="mlabels-right">
|
||
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>Get a string from a file.</p>
|
||
|
<p><a class="el" href="class_fs_file.html#a5cb3b795bd7145df456b99258278a313">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_fs_file.html#a5cb3b795bd7145df456b99258278a313">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_fs_file.html#a5cb3b795bd7145df456b99258278a313">fgets()</a> returns the length of the string in <em>str</em>. If no data is read, <a class="el" href="class_fs_file.html#a5cb3b795bd7145df456b99258278a313">fgets()</a> returns zero for EOF or -1 if an error occurred. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a3b2ad9659ec0b6fcaf8d66b2a63e4b0a"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">uint64_t FsFile::fileSize </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 total number of bytes in a file. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a3f745cdae518481af4f2521a5f14968a"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void FsFile::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>Ensure that any bytes written to the file are saved to the SD card. </p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a42e9cfd4b5aa8135b98efd54a1962b5e"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">size_t FsFile::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>len</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">inline</span></span> </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">len</td><td>The size of the array in bytes. The array must be at least 13 bytes long. The file's name will be truncated if the file's name is too long. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>The length of the returned string. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="aa3f0e5c34ec12eb24b5c45c564fdfbac"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::isDir </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>True if this is a directory else false. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="aff4fcf3b043f021753c1b9b2ca8ca878"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::isDirectory </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>This function reports if the current file is a directory or not. </p><dl class="section return"><dt>Returns</dt><dd>true if the file is a directory. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a98a3692f7e75dae6c4cc92d75ef0e3f6"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::isHidden </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>True if this is a hidden file else false. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ad89dfb5b0aa218d399c6d903f533e4b8"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::isOpen </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>True if this is an open file/directory else false. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ae0e388357a638b2e9190692e3e484d28"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void FsFile::ls </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">uint8_t </td>
|
||
|
<td class="paramname"><em>flags</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>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="aec4985bdff278df9b992cc6ba1bb8780"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void FsFile::ls </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>List directory contents. </p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="acebe374e1381d48c49026a641de56d85"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void FsFile::ls </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">print_t * </td>
|
||
|
<td class="paramname"><em>pr</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>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 object. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ad9bb9e55706a5917053d7fa162386c17"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void FsFile::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> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</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">pr</td><td>Print object. </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>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="aafcef0c6410a51692a8d47f8714669a9"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::mkdir </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="class_fs_file.html">FsFile</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 8.3 DOS 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="a45a33cf3d80a6a2cad564f00fbdf2bba"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">const char* FsFile::name </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">
|
||
|
<p>No longer implemented due to Long <a class="el" href="class_file.html" title="FAT16/FAT32 file with Arduino Stream. ">File</a> Names.</p>
|
||
|
<p>Use <a class="el" href="class_fs_file.html#a42e9cfd4b5aa8135b98efd54a1962b5e">getName(char* name, size_t size)</a>. </p><dl class="section return"><dt>Returns</dt><dd>a pointer to replacement suggestion. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="aca1b69e44e2370a2854260027199c482"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::open </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="class_fs_file.html">FsFile</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">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 or directory by name.</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 file 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 8.3 DOS 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_fs_file.html#aca1b69e44e2370a2854260027199c482">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 file 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="ae9f8af9b2c6678c7584f72699762af02"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::open </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="class_fs_volume.html">FsVolume</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 or directory by name.</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>A path 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 open flags.</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="ada89c7e32e47fa98d248071af673bd7a"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::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>
|
||
|
</td>
|
||
|
<td class="mlabels-right">
|
||
|
<span class="mlabels"><span class="mlabel">inline</span></span> </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">path</td><td>A path 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 open flags.</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="a3d3c44f8d1a661b8b00561610ab27437"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::openNext </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="class_fs_file.html">FsFile</a> * </td>
|
||
|
<td class="paramname"><em>dir</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>Opens the next file or folder in a directory. </p><dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramdir">[in]</td><td class="paramname">dir</td><td>directory containing files. </td></tr>
|
||
|
<tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>open flags. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>a file object. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="aa985c47806ef8a57589b82a71b593a37"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">FsFile::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="a1d6aedaa6a96b5c27fbe006da83287be"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname"><a class="el" href="class_fs_file.html">FsFile</a> & FsFile::operator= </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">const <a class="el" href="class_fs_file.html">FsFile</a> & </td>
|
||
|
<td class="paramname"><em>from</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>Copy assignment operator </p><dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramdir">[in]</td><td class="paramname">from</td><td>Object used to initialize this instance. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>assigned object. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ad2ff91b86bc73c280b8ff96a80551bdf"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int FsFile::peek </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>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="a9530e4383120004bce72590f0ce8af32"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">uint64_t FsFile::position </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 current file position. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a7319a7b532b60ecc0fd11de380db3a1e"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::preAllocate </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">uint64_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>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 for FAT16/FAT32 files. exFAT files will have zero validLength and dataLength will equal the requested length.</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="aa43303010dca2d82e3e9423cf692a38f"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">size_t FsFile::printFileSize </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">print_t * </td>
|
||
|
<td class="paramname"><em>pr</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>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="ae775cd32a8a3e5ed4084f5a13150c1c8"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">size_t FsFile::printModifyDateTime </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">print_t * </td>
|
||
|
<td class="paramname"><em>pr</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>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 value true is returned for success and the value false is returned for failure. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a709b332e1a880aaf60e5096e74afdac2"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">size_t FsFile::printName </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">print_t * </td>
|
||
|
<td class="paramname"><em>pr</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>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="ae956843999a0e679d6a420ab7f25910e"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int FsFile::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 return the next byte in the file as an int. If an error occurs or end of file is reached return -1. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a5a6d7a8c18a4bea95c46ba443f78c681"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int FsFile::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>
|
||
|
</td>
|
||
|
<td class="mlabels-right">
|
||
|
<span class="mlabels"><span class="mlabel">inline</span></span> </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_fs_file.html#ae956843999a0e679d6a420ab7f25910e">read()</a> returns the number of bytes read. A value less than <em>count</em>, including zero, will be returned if end of file is reached. If an error occurs, <a class="el" href="class_fs_file.html#ae956843999a0e679d6a420ab7f25910e">read()</a> returns -1. Possible errors include <a class="el" href="class_fs_file.html#ae956843999a0e679d6a420ab7f25910e">read()</a> called before a file has been opened, corrupt file system or an I/O error occurred. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a7754ef77a321062761e4f7477aafdc10"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::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="a9adf8feef0f7e5d19a2cfbb797a89398"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::remove </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>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="affc3e1a76b934c40d533ac6d324df652"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::rename </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">const char * </td>
|
||
|
<td class="paramname"><em>newPath</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>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="a39fad32a17c96d026af206126abb3526"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::rename </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="class_fs_file.html">FsFile</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>
|
||
|
</td>
|
||
|
<td class="mlabels-right">
|
||
|
<span class="mlabels"><span class="mlabel">inline</span></span> </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="a26397329f1dd09da9d4c4d455226e8ab"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void FsFile::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="a18ac1a450b0381ee26da6868d32ce864"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void FsFile::rewindDirectory </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>Rewind a file if it is a directory </p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ae7c1d191a789a5cd1051dde09b4bf0c0"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::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_fs_file.html#ae7c1d191a789a5cd1051dde09b4bf0c0">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="aecf174b40f5477b6369bcd29b999b944"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::seek </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">uint64_t </td>
|
||
|
<td class="paramname"><em>pos</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>Seek to a new position in the file, which must be between 0 and the size of the file (inclusive).</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 file position. </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="a7936ebe47525bb5d82fd2970774f2a63"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::seekCur </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">int64_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_fs_file.html#ad8315a40e05580de98f8f2d9d283b12e">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="acaed959183e0461adb93f7778cb4ebd7"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::seekEnd </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">int64_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_fs_file.html#ad8315a40e05580de98f8f2d9d283b12e">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="ad8315a40e05580de98f8f2d9d283b12e"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::seekSet </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">uint64_t </td>
|
||
|
<td class="paramname"><em>pos</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>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="a57158f8c85852a0b56601db9663450ed"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">uint64_t FsFile::size </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 file's size. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a490b2b9e72903db050d256f6b4f707e3"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::sync </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 <a class="el" href="class_fs_file.html#a490b2b9e72903db050d256f6b4f707e3">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="aac1c3490a8d01c142ffc8b735cb44c10"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::truncate </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>Truncate a file to the current position.</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="a234d3fde11828e6811cd99dfb55dbfdf"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool FsFile::truncate </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">uint64_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="a93df37a0354be9e1b0a37a07a66dfa25"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">size_t FsFile::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 byte to a file. Required 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">b</td><td>the byte to be written. Use getWriteError to check for errors. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>1 for success and 0 for failure. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a4146400a1e38a0a5bd9360e5a5eaefa0"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">size_t FsFile::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>
|
||
|
</td>
|
||
|
<td class="mlabels-right">
|
||
|
<span class="mlabels"><span class="mlabel">inline</span></span> </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_fs_file.html#a490b2b9e72903db050d256f6b4f707e3">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_fs_file.html#a93df37a0354be9e1b0a37a07a66dfa25">write()</a> returns the number of bytes written, always <em>nbyte</em>. If an error occurs, <a class="el" href="class_fs_file.html#a93df37a0354be9e1b0a37a07a66dfa25">write()</a> returns -1. Possible errors include <a class="el" href="class_fs_file.html#a93df37a0354be9e1b0a37a07a66dfa25">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/<a class="el" href="_fs_file_8h.html">FsFile.h</a></li>
|
||
|
<li>ArduinoSdFs/libraries/SdFs/src/FsFile.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>
|