⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__fat__file.html

📁 This project provides a general purpose library which implements read and write support for MMC, SD
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>sd-reader: FAT file functions</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.6 --><div class="navigation" id="top">  <div class="tabs">    <ul>      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>      <li><a href="modules.html"><span>Modules</span></a></li>      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>      <li><a href="files.html"><span>Files</span></a></li>    </ul>  </div></div><div class="contents"><h1>FAT file functions<br><small>[<a class="el" href="group__fat.html">FAT support</a>]</small></h1><hr><a name="_details"></a><h2>Detailed Description</h2>Functions for managing files. <p><p><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Data Structures</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Describes a directory entry.  <a href="structfat__dir__entry__struct.html#_details">More...</a><br></td></tr><tr><td colspan="2"><br><h2>Defines</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#gc404d1380dbf00e8a1d6145e035ef10b">FAT_ATTRIB_READONLY</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is read-only.  <a href="#gc404d1380dbf00e8a1d6145e035ef10b"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#gaf88f01d19ef4ca777c9c683f458f45f">FAT_ATTRIB_HIDDEN</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is hidden.  <a href="#gaf88f01d19ef4ca777c9c683f458f45f"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#ge5aa3610233e87e4ca36b2afe3c3854c">FAT_ATTRIB_SYSTEM</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is a system file.  <a href="#ge5aa3610233e87e4ca36b2afe3c3854c"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#g86f9c93dd409d11813361d48517ccbce">FAT_ATTRIB_VOLUME</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is empty and has the volume label as its name.  <a href="#g86f9c93dd409d11813361d48517ccbce"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#gcd38dccfabf884611c62aebc90e5adc7">FAT_ATTRIB_DIR</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is a directory.  <a href="#gcd38dccfabf884611c62aebc90e5adc7"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#g18ef7ecd9adce93d49a571882e145c99">FAT_ATTRIB_ARCHIVE</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file has to be archived.  <a href="#g18ef7ecd9adce93d49a571882e145c99"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#gb870215439192f82ed358e2c7e94ba09">FAT_SEEK_SET</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The given offset is relative to the beginning of the file.  <a href="#gb870215439192f82ed358e2c7e94ba09"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#gdba54c574b9a738c8b766ea3b40eeef2">FAT_SEEK_CUR</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The given offset is relative to the current read/write position.  <a href="#gdba54c574b9a738c8b766ea3b40eeef2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#gb34d95851ea8b28646ce25c0e0039bc2">FAT_SEEK_END</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The given offset is relative to the end of the file.  <a href="#gb34d95851ea8b28646ce25c0e0039bc2"></a><br></td></tr><tr><td colspan="2"><br><h2>Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#g033743a7d8878712e0add6d57b750525">fat_get_dir_entry_of_path</a> (struct fat_fs_struct *fs, const char *path, struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> *dir_entry)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the directory entry of a path.  <a href="#g033743a7d8878712e0add6d57b750525"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat_file_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#g76a0b06949525b578db04a56d67fbfc4">fat_open_file</a> (struct fat_fs_struct *fs, const struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> *dir_entry)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a file on a FAT filesystem.  <a href="#g76a0b06949525b578db04a56d67fbfc4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#g70b082abb4ebc8d4e9956886901b55fc">fat_close_file</a> (struct fat_file_struct *fd)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a file.  <a href="#g70b082abb4ebc8d4e9956886901b55fc"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">intptr_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#g48e17b173bede64cb08cef05b88fd0ca">fat_read_file</a> (struct fat_file_struct *fd, uint8_t *buffer, uintptr_t buffer_len)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads data from a file.  <a href="#g48e17b173bede64cb08cef05b88fd0ca"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">intptr_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#g6782ff80eb6fba9b6ed1a66f33dae60a">fat_write_file</a> (struct fat_file_struct *fd, const uint8_t *buffer, uintptr_t buffer_len)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes data to a file.  <a href="#g6782ff80eb6fba9b6ed1a66f33dae60a"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#gd4c305cf004bae9bea48730ed20c87ec">fat_seek_file</a> (struct fat_file_struct *fd, int32_t *offset, uint8_t whence)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Repositions the read/write file offset.  <a href="#gd4c305cf004bae9bea48730ed20c87ec"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#gce4858e7a145684f6c8cd14debe14255">fat_resize_file</a> (struct fat_file_struct *fd, uint32_t size)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resizes a file to have a specific size.  <a href="#gce4858e7a145684f6c8cd14debe14255"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#g9d17d09125359dfb440fc57eede40b4f">fat_create_file</a> (struct fat_dir_struct *parent, const char *file, struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> *dir_entry)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a file.  <a href="#g9d17d09125359dfb440fc57eede40b4f"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#g46055219b942eb8d57ffae9dc6447e7c">fat_delete_file</a> (struct fat_fs_struct *fs, struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> *dir_entry)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a file or directory.  <a href="#g46055219b942eb8d57ffae9dc6447e7c"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#g24763fd73cbeb580ae5d19e975bde0d8">fat_get_file_modification_date</a> (const struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> *dir_entry, uint16_t *year, uint8_t *month, uint8_t *day)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the modification date of a file.  <a href="#g24763fd73cbeb580ae5d19e975bde0d8"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#g74f840c317556b7dae766e199d87a6ef">fat_get_file_modification_time</a> (const struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> *dir_entry, uint8_t *hour, uint8_t *min, uint8_t *sec)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the modification time of a file.  <a href="#g74f840c317556b7dae766e199d87a6ef"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#g02c969e994a556534c92906db5bb04fd">fat_set_file_modification_date</a> (struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> *dir_entry, uint16_t year, uint8_t month, uint8_t day)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the modification time of a date.  <a href="#g02c969e994a556534c92906db5bb04fd"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__file.html#gb514f14ce35a38bff3f16270dfdc033b">fat_set_file_modification_time</a> (struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> *dir_entry, uint8_t hour, uint8_t min, uint8_t sec)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the modification time of a file.  <a href="#gb514f14ce35a38bff3f16270dfdc033b"></a><br></td></tr></table><hr><h2>Define Documentation</h2><a class="anchor" name="g18ef7ecd9adce93d49a571882e145c99"></a><!-- doxytag: member="fat.h::FAT_ATTRIB_ARCHIVE" ref="g18ef7ecd9adce93d49a571882e145c99" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define FAT_ATTRIB_ARCHIVE          </td>        </tr>      </table></div><div class="memdoc"><p>The file has to be archived. <p></div></div><p><a class="anchor" name="gcd38dccfabf884611c62aebc90e5adc7"></a><!-- doxytag: member="fat.h::FAT_ATTRIB_DIR" ref="gcd38dccfabf884611c62aebc90e5adc7" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define FAT_ATTRIB_DIR          </td>        </tr>      </table></div><div class="memdoc"><p>The file is a directory. <p></div></div><p><a class="anchor" name="gaf88f01d19ef4ca777c9c683f458f45f"></a><!-- doxytag: member="fat.h::FAT_ATTRIB_HIDDEN" ref="gaf88f01d19ef4ca777c9c683f458f45f" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define FAT_ATTRIB_HIDDEN          </td>        </tr>      </table></div><div class="memdoc"><p>The file is hidden. <p></div></div><p><a class="anchor" name="gc404d1380dbf00e8a1d6145e035ef10b"></a><!-- doxytag: member="fat.h::FAT_ATTRIB_READONLY" ref="gc404d1380dbf00e8a1d6145e035ef10b" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define FAT_ATTRIB_READONLY          </td>        </tr>      </table></div><div class="memdoc"><p>The file is read-only. <p></div></div><p><a class="anchor" name="ge5aa3610233e87e4ca36b2afe3c3854c"></a><!-- doxytag: member="fat.h::FAT_ATTRIB_SYSTEM" ref="ge5aa3610233e87e4ca36b2afe3c3854c" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define FAT_ATTRIB_SYSTEM          </td>        </tr>      </table></div><div class="memdoc"><p>The file is a system file. <p></div></div><p><a class="anchor" name="g86f9c93dd409d11813361d48517ccbce"></a><!-- doxytag: member="fat.h::FAT_ATTRIB_VOLUME" ref="g86f9c93dd409d11813361d48517ccbce" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define FAT_ATTRIB_VOLUME          </td>        </tr>      </table></div><div class="memdoc"><p>The file is empty and has the volume label as its name. <p></div></div><p><a class="anchor" name="gdba54c574b9a738c8b766ea3b40eeef2"></a><!-- doxytag: member="fat.h::FAT_SEEK_CUR" ref="gdba54c574b9a738c8b766ea3b40eeef2" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define FAT_SEEK_CUR          </td>        </tr>      </table></div><div class="memdoc"><p>The given offset is relative to the current read/write position. <p></div></div><p><a class="anchor" name="gb34d95851ea8b28646ce25c0e0039bc2"></a><!-- doxytag: member="fat.h::FAT_SEEK_END" ref="gb34d95851ea8b28646ce25c0e0039bc2" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define FAT_SEEK_END          </td>        </tr>      </table></div><div class="memdoc"><p>The given offset is relative to the end of the file. <p></div></div><p><a class="anchor" name="gb870215439192f82ed358e2c7e94ba09"></a><!-- doxytag: member="fat.h::FAT_SEEK_SET" ref="gb870215439192f82ed358e2c7e94ba09" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define FAT_SEEK_SET          </td>        </tr>      </table></div><div class="memdoc"><p>The given offset is relative to the beginning of the file. <p></div></div><p><hr><h2>Function Documentation</h2><a class="anchor" name="g70b082abb4ebc8d4e9956886901b55fc"></a><!-- doxytag: member="fat.c::fat_close_file" ref="g70b082abb4ebc8d4e9956886901b55fc" args="(struct fat_file_struct *fd)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void fat_close_file           </td>          <td>(</td>          <td class="paramtype">struct fat_file_struct *&nbsp;</td>          <td class="paramname"> <em>fd</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td></td>        </tr>      </table></div><div class="memdoc"><p>Closes a file. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>The file handle of the file to close. </td></tr>  </table></dl><dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat.html#g76a0b06949525b578db04a56d67fbfc4" title="Opens a file on a FAT filesystem.">fat_open_file</a> </dd></dl></div></div><p><a class="anchor" name="g9d17d09125359dfb440fc57eede40b4f"></a><!-- doxytag: member="fat.c::fat_create_file" ref="g9d17d09125359dfb440fc57eede40b4f" args="(struct fat_dir_struct *parent, const char *file, struct fat_dir_entry_struct *dir_entry)" --><div class="memitem">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -