This repository has been archived on 2020-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
arduino_universal_serial_ad.../Libraries/SdFat/html/class_sd_fat.html

834 lines
38 KiB
HTML
Raw Normal View History

<!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"/>
<title>SdFat: SdFat Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">SdFat</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</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>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">SdFat Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="SdFat" -->
<p>Integration class for the SdFat library.
<a href="class_sd_fat.html#details">More...</a></p>
<p><code>#include &lt;SdFat.h&gt;</code></p>
<div class="dynheader">
Collaboration diagram for SdFat:</div>
<div class="dyncontent">
<div class="center"><img src="class_sd_fat__coll__graph.png" border="0" usemap="#_sd_fat_coll__map" alt="Collaboration graph"/></div>
<map name="_sd_fat_coll__map" id="_sd_fat_coll__map">
<area shape="rect" id="node2" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams." alt="" coords="277,368,360,395"/> <area shape="rect" id="node4" href="class_sd_volume.html" title="Access FAT16 and FAT32 volumes on SD and SDHC cards." alt="" coords="249,277,329,304"/> <area shape="rect" id="node6" href="unioncache__t.html" title="Cache for an SD data block." alt="" coords="247,187,313,213"/> <area shape="rect" id="node8" href="structdirectory_entry.html" title="FAT short directory entry." alt="" coords="5,96,107,123"/> <area shape="rect" id="node10" href="structfat32__fsinfo.html" title="FSINFO sector for a FAT32 volume." alt="" coords="131,96,220,123"/> <area shape="rect" id="node12" href="structfat__boot.html" title="Boot sector for a FAT12/FAT16 volume." alt="" coords="245,96,315,123"/> <area shape="rect" id="node14" href="structmaster_boot_record.html" title="Master Boot Record." alt="" coords="339,96,465,123"/> <area shape="rect" id="node16" href="structpartition_table.html" title="MBR partition table entry." alt="" coords="352,5,453,32"/> <area shape="rect" id="node18" href="structfat32__boot.html" title="Boot sector for a FAT32 volume." alt="" coords="491,96,573,123"/> <area shape="rect" id="node20" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards." alt="" coords="383,187,453,213"/> </map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="class_sd_fat-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a044bc27ba8b195519a56481484fca78b">begin</a> (uint8_t chipSelectPin=<a class="el" href="_sd2_card_8h.html#ae6b17538c14ba6c91ccb513db2c4c29c">SD_CHIP_SELECT_PIN</a>, uint8_t sckRateID=<a class="el" href="_sd2_card_8h.html#a6c091c07d1eb82a94b1c5738f720264b">SPI_FULL_SPEED</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_sd2_card.html">Sd2Card</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a9a4deb665fb0140daf22c62de3ae497d">card</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#aa17f9efe90fb42543395c43804b120f0">chdir</a> (const char *path, bool set_cwd=false)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#aba234d73505354cbb105b4ad7d3524b0">chdir</a> (bool set_cwd=false)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a1c61e5433f4734f9fb3e1426fd804494">chvol</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#aaba28b5be802f623969022226e6dfd21">errorHalt</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a8240ad752998c4788a9aa8fea4f6f075">errorHalt</a> (char const *msg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a1ddef63d71c00f49a521e8a81472fd60">errorHalt_P</a> (PGM_P msg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a1ff9f2027978d6ea5fcbd81d53378a7f">errorPrint</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a47256ec22b421d76bbf86901d47226fa">errorPrint</a> (char const *msg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#ab432c14265f396c3559e575fe3cd512b">errorPrint_P</a> (PGM_P msg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a15e97702e6a8654a86a745dc20c9ae8a">exists</a> (const char *name)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a6294adccc03e23e35db6488bf9ace69f">initErrorHalt</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a28e8e4d72848a1024056c4b59a18fb78">initErrorHalt</a> (char const *msg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a23599f8e6bea81f22b167b50733c5f47">initErrorHalt_P</a> (PGM_P msg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#ae2210d3d663bd54740eddfb83bcf4473">initErrorPrint</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a6ea82316a10297b53393c39034d560fb">initErrorPrint</a> (char const *msg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#adc8cd692cbba16fae572207e329e48c3">initErrorPrint_P</a> (PGM_P msg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a74846855ee6cd53b1716adeaf630b12c">ls</a> (uint8_t flags=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a039202434f459b1ec558897d32cb928c">ls</a> (Print *pr, uint8_t flags=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a1fe08676296e10b4c1e30311ce35b4de">mkdir</a> (const char *path, bool pFlag=true)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#affdaad4aeac6fc6d678b21c2a271d09d">remove</a> (const char *path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a39afa05b07c30872b27c3d2b53b56911">rename</a> (const char *oldPath, const char *newPath)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a9ece030794f3fb78018cfc9803a62c69">rmdir</a> (const char *path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#ac0c2ed27d37bdb1b50f4543253871c1e">truncate</a> (const char *path, uint32_t length)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_sd_volume.html">SdVolume</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a9fca7480532e54b828a3a31015f7c905">vol</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_sd_base_file.html">SdBaseFile</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a7027f78e1febb655009b62d7f6c10bbb">vwd</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#a87c53828b0ccd33c77d2a8175c4cdf82">setStdOut</a> (Print *stream)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static Print *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_fat.html#ae5f0467524c70b7a85840c291710d7ca">stdOut</a> ()</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Integration class for the SdFat library. </p>
<p>error if old IDE </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a044bc27ba8b195519a56481484fca78b"></a><!-- doxytag: member="SdFat::begin" ref="a044bc27ba8b195519a56481484fca78b" args="(uint8_t chipSelectPin=SD_CHIP_SELECT_PIN, uint8_t sckRateID=SPI_FULL_SPEED)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SdFat::begin </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>chipSelectPin</em> = <code><a class="el" href="_sd2_card_8h.html#ae6b17538c14ba6c91ccb513db2c4c29c">SD_CHIP_SELECT_PIN</a></code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>sckRateID</em> = <code><a class="el" href="_sd2_card_8h.html#a6c091c07d1eb82a94b1c5738f720264b">SPI_FULL_SPEED</a></code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Initialize an <a class="el" href="class_sd_fat.html" title="Integration class for the SdFat library.">SdFat</a> object.</p>
<p>Initializes the SD card, SD volume, and root directory.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">chipSelectPin</td><td>SD chip select pin. See <a class="el" href="class_sd2_card.html#a9aa3e3d0919b5270d65f3171b952962e">Sd2Card::init()</a>. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">sckRateID</td><td>value for SPI SCK rate. See <a class="el" href="class_sd2_card.html#a9aa3e3d0919b5270d65f3171b952962e">Sd2Card::init()</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a9a4deb665fb0140daf22c62de3ae497d"></a><!-- doxytag: member="SdFat::card" ref="a9a4deb665fb0140daf22c62de3ae497d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_sd2_card.html">Sd2Card</a>* SdFat::card </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to the <a class="el" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a> object. </dd></dl>
</div>
</div>
<a class="anchor" id="aba234d73505354cbb105b4ad7d3524b0"></a><!-- doxytag: member="SdFat::chdir" ref="aba234d73505354cbb105b4ad7d3524b0" args="(bool set_cwd=false)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SdFat::chdir </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>set_cwd</em> = <code>false</code></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Change a volume's working directory to root</p>
<p>Changes the volume's working directory to the SD's root directory. Optionally set the current working directory to the volume's working directory.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">set_cwd</td><td>Set the current working directory to this volume's working directory if true.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="aa17f9efe90fb42543395c43804b120f0"></a><!-- doxytag: member="SdFat::chdir" ref="aa17f9efe90fb42543395c43804b120f0" args="(const char *path, bool set_cwd=false)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SdFat::chdir </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>set_cwd</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Change a volume's working directory</p>
<p>Changes the volume working directory to the <em>path</em> subdirectory. Optionally set the current working directory to the volume's working directory.</p>
<p>Example: If the volume's working directory is "/DIR", chdir("SUB") will change the volume's working directory from "/DIR" to "/DIR/SUB".</p>
<p>If path is "/", the volume's working directory will be changed to the root directory</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>The name of the subdirectory.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">set_cwd</td><td>Set the current working directory to this volume's working directory if true.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a1c61e5433f4734f9fb3e1426fd804494"></a><!-- doxytag: member="SdFat::chvol" ref="a1c61e5433f4734f9fb3e1426fd804494" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::chvol </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the current working directory to a volume's working directory.</p>
<p>This is useful with multiple SD cards.</p>
<p>The current working directory is changed to this volume's working directory.</p>
<p>This is like the Windows/DOS &lt;drive letter&gt;: command. </p>
</div>
</div>
<a class="anchor" id="aaba28b5be802f623969022226e6dfd21"></a><!-- doxytag: member="SdFat::errorHalt" ref="aaba28b5be802f623969022226e6dfd21" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::errorHalt </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print any SD error code and halt. </p>
</div>
</div>
<a class="anchor" id="a8240ad752998c4788a9aa8fea4f6f075"></a><!-- doxytag: member="SdFat::errorHalt" ref="a8240ad752998c4788a9aa8fea4f6f075" args="(char const *msg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::errorHalt </td>
<td>(</td>
<td class="paramtype">char const *&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print msg, any SD error code, and halt.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>Message to print. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a1ddef63d71c00f49a521e8a81472fd60"></a><!-- doxytag: member="SdFat::errorHalt_P" ref="a1ddef63d71c00f49a521e8a81472fd60" args="(PGM_P msg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::errorHalt_P </td>
<td>(</td>
<td class="paramtype">PGM_P&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print msg, any SD error code, and halt.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>Message in program space (flash memory) to print. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a47256ec22b421d76bbf86901d47226fa"></a><!-- doxytag: member="SdFat::errorPrint" ref="a47256ec22b421d76bbf86901d47226fa" args="(char const *msg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::errorPrint </td>
<td>(</td>
<td class="paramtype">char const *&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print msg, any SD error code.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>Message to print. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a1ff9f2027978d6ea5fcbd81d53378a7f"></a><!-- doxytag: member="SdFat::errorPrint" ref="a1ff9f2027978d6ea5fcbd81d53378a7f" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::errorPrint </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print any SD error code. </p>
</div>
</div>
<a class="anchor" id="ab432c14265f396c3559e575fe3cd512b"></a><!-- doxytag: member="SdFat::errorPrint_P" ref="ab432c14265f396c3559e575fe3cd512b" args="(PGM_P msg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::errorPrint_P </td>
<td>(</td>
<td class="paramtype">PGM_P&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print msg, any SD error code.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>Message in program space (flash memory) to print. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a15e97702e6a8654a86a745dc20c9ae8a"></a><!-- doxytag: member="SdFat::exists" ref="a15e97702e6a8654a86a745dc20c9ae8a" args="(const char *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SdFat::exists </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>name</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Test for the existence of a file.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>Name of the file to be tested for.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the file exists else false. </dd></dl>
</div>
</div>
<a class="anchor" id="a6294adccc03e23e35db6488bf9ace69f"></a><!-- doxytag: member="SdFat::initErrorHalt" ref="a6294adccc03e23e35db6488bf9ace69f" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::initErrorHalt </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print error details and halt after SdFat::init() fails. </p>
</div>
</div>
<a class="anchor" id="a28e8e4d72848a1024056c4b59a18fb78"></a><!-- doxytag: member="SdFat::initErrorHalt" ref="a28e8e4d72848a1024056c4b59a18fb78" args="(char const *msg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::initErrorHalt </td>
<td>(</td>
<td class="paramtype">char const *&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print message, error details, and halt after SdFat::init() fails.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>Message to print. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a23599f8e6bea81f22b167b50733c5f47"></a><!-- doxytag: member="SdFat::initErrorHalt_P" ref="a23599f8e6bea81f22b167b50733c5f47" args="(PGM_P msg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::initErrorHalt_P </td>
<td>(</td>
<td class="paramtype">PGM_P&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print message, error details, and halt after SdFat::init() fails.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>Message in program space (flash memory) to print. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ae2210d3d663bd54740eddfb83bcf4473"></a><!-- doxytag: member="SdFat::initErrorPrint" ref="ae2210d3d663bd54740eddfb83bcf4473" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::initErrorPrint </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print error details after SdFat::init() fails. </p>
</div>
</div>
<a class="anchor" id="a6ea82316a10297b53393c39034d560fb"></a><!-- doxytag: member="SdFat::initErrorPrint" ref="a6ea82316a10297b53393c39034d560fb" args="(char const *msg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::initErrorPrint </td>
<td>(</td>
<td class="paramtype">char const *&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print message and error details and halt after SdFat::init() fails.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>Message to print. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="adc8cd692cbba16fae572207e329e48c3"></a><!-- doxytag: member="SdFat::initErrorPrint_P" ref="adc8cd692cbba16fae572207e329e48c3" args="(PGM_P msg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::initErrorPrint_P </td>
<td>(</td>
<td class="paramtype">PGM_P&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print message and error details after SdFat::init() fails.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>Message in program space (flash memory) to print. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a039202434f459b1ec558897d32cb928c"></a><!-- doxytag: member="SdFat::ls" ref="a039202434f459b1ec558897d32cb928c" args="(Print *pr, uint8_t flags=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::ls </td>
<td>(</td>
<td class="paramtype">Print *&#160;</td>
<td class="paramname"><em>pr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>flags</em> = <code>0</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>List the directory contents of the volume working directory.</p>
<dl><dt><b>Parameters:</b></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>
</div>
</div>
<a class="anchor" id="a74846855ee6cd53b1716adeaf630b12c"></a><!-- doxytag: member="SdFat::ls" ref="a74846855ee6cd53b1716adeaf630b12c" args="(uint8_t flags=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SdFat::ls </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>flags</em> = <code>0</code></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>List the directory contents of the volume working directory to stdOut.</p>
<dl><dt><b>Parameters:</b></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="a1fe08676296e10b4c1e30311ce35b4de"></a><!-- doxytag: member="SdFat::mkdir" ref="a1fe08676296e10b4c1e30311ce35b4de" args="(const char *path, bool pFlag=true)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SdFat::mkdir </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>pFlag</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Make a subdirectory in the volume working directory.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path with a valid 8.3 DOS name for the subdirectory.</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="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="affdaad4aeac6fc6d678b21c2a271d09d"></a><!-- doxytag: member="SdFat::remove" ref="affdaad4aeac6fc6d678b21c2a271d09d" args="(const char *path)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SdFat::remove </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>path</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Remove a file from the volume working directory.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path with a valid 8.3 DOS name for the file.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a39afa05b07c30872b27c3d2b53b56911"></a><!-- doxytag: member="SdFat::rename" ref="a39afa05b07c30872b27c3d2b53b56911" args="(const char *oldPath, const char *newPath)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SdFat::rename </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>oldPath</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>newPath</em>&#160;</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><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">oldPath</td><td>Path name to the file or subdirectory to be renamed.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">newPath</td><td>New path name of the file or subdirectory.</td></tr>
</table>
</dd>
</dl>
<p>The <em>newPath</em> object must not exist before the rename call.</p>
<p>The file to be renamed must not be open. The directory entry may be moved and file system corruption could occur if the file is accessed by a file object that was opened before the <a class="el" href="class_sd_fat.html#a39afa05b07c30872b27c3d2b53b56911">rename()</a> call.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a9ece030794f3fb78018cfc9803a62c69"></a><!-- doxytag: member="SdFat::rmdir" ref="a9ece030794f3fb78018cfc9803a62c69" args="(const char *path)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SdFat::rmdir </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>path</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Remove a subdirectory from the volume's working directory.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path with a valid 8.3 DOS name for the subdirectory.</td></tr>
</table>
</dd>
</dl>
<p>The subdirectory file will be removed only if it is empty.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a87c53828b0ccd33c77d2a8175c4cdf82"></a><!-- doxytag: member="SdFat::setStdOut" ref="a87c53828b0ccd33c77d2a8175c4cdf82" args="(Print *stream)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void SdFat::setStdOut </td>
<td>(</td>
<td class="paramtype">Print *&#160;</td>
<td class="paramname"><em>stream</em></td><td>)</td>
<td><code> [inline, static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set stdOut Print stream for messages. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">stream</td><td>The new Print stream. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ae5f0467524c70b7a85840c291710d7ca"></a><!-- doxytag: member="SdFat::stdOut" ref="ae5f0467524c70b7a85840c291710d7ca" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static Print* SdFat::stdOut </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline, static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>Print stream for messages. </dd></dl>
</div>
</div>
<a class="anchor" id="ac0c2ed27d37bdb1b50f4543253871c1e"></a><!-- doxytag: member="SdFat::truncate" ref="ac0c2ed27d37bdb1b50f4543253871c1e" args="(const char *path, uint32_t length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SdFat::truncate </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Truncate a file to a specified length. The current file position will be maintained if it is less than or equal to <em>length</em> otherwise it will be set to end of file.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path with a valid 8.3 DOS name for the file. </td></tr>
<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="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is read only, file is a directory, <em>length</em> is greater than the current file size or an I/O error occurs. </dd></dl>
</div>
</div>
<a class="anchor" id="a9fca7480532e54b828a3a31015f7c905"></a><!-- doxytag: member="SdFat::vol" ref="a9fca7480532e54b828a3a31015f7c905" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_sd_volume.html">SdVolume</a>* SdFat::vol </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to the <a class="el" href="class_sd_volume.html" title="Access FAT16 and FAT32 volumes on SD and SDHC cards.">SdVolume</a> object. </dd></dl>
</div>
</div>
<a class="anchor" id="a7027f78e1febb655009b62d7f6c10bbb"></a><!-- doxytag: member="SdFat::vwd" ref="a7027f78e1febb655009b62d7f6c10bbb" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_sd_base_file.html">SdBaseFile</a>* SdFat::vwd </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to the volume working directory. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>Arduino/libraries/SdFat/<a class="el" href="_sd_fat_8h.html">SdFat.h</a></li>
<li>Arduino/libraries/SdFat/SdFat.cpp</li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Feb 7 2013 12:51:22 for SdFat by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>