📄 group__fat__dir.html
字号:
<!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 directory 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 Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div></div><div class="contents"><h1>FAT directory 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 directories. <p><p><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat_dir_struct * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__dir.html#gc7a5b4ad0b972759a965e1afd5bbc87c">fat_open_dir</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"> </td><td class="mdescRight">Opens a directory. <a href="#gc7a5b4ad0b972759a965e1afd5bbc87c"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__dir.html#g2fed74d916370428e3dcf278e7050111">fat_close_dir</a> (struct fat_dir_struct *dd)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Closes a directory descriptor. <a href="#g2fed74d916370428e3dcf278e7050111"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__dir.html#gb4bc79452dbf5ac2a2f3e1fccafd9534">fat_read_dir</a> (struct fat_dir_struct *dd, struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> *dir_entry)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Reads the next directory entry contained within a parent directory. <a href="#gb4bc79452dbf5ac2a2f3e1fccafd9534"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__dir.html#g2d74af47cb9fd44f7c974834f810225f">fat_reset_dir</a> (struct fat_dir_struct *dd)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Resets a directory handle. <a href="#g2d74af47cb9fd44f7c974834f810225f"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__dir.html#gff3b524066c9a937fae32771c80e7603">fat_create_dir</a> (struct fat_dir_struct *parent, const char *dir, struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> *dir_entry)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a directory. <a href="#gff3b524066c9a937fae32771c80e7603"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat__dir.html#gc0b6889e84a48b2d69fd681e5ac2e772">fat_delete_dir</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"> </td><td class="mdescRight">Deletes a directory. <a href="#gc0b6889e84a48b2d69fd681e5ac2e772"></a><br></td></tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="g2fed74d916370428e3dcf278e7050111"></a><!-- doxytag: member="fat.c::fat_close_dir" ref="g2fed74d916370428e3dcf278e7050111" args="(struct fat_dir_struct *dd)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void fat_close_dir </td> <td>(</td> <td class="paramtype">struct fat_dir_struct * </td> <td class="paramname"> <em>dd</em> </td> <td> ) </td> <td></td> </tr> </table></div><div class="memdoc"><p>Closes a directory descriptor. <p>This function destroys a directory descriptor which was previously obtained by calling <a class="el" href="group__fat__dir.html#gc7a5b4ad0b972759a965e1afd5bbc87c" title="Opens a directory.">fat_open_dir()</a>. When this function returns, the given descriptor will be invalid.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>dd</em> </td><td>The directory descriptor to close. </td></tr> </table></dl><dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat.html#gc7a5b4ad0b972759a965e1afd5bbc87c" title="Opens a directory.">fat_open_dir</a> </dd></dl></div></div><p><a class="anchor" name="gff3b524066c9a937fae32771c80e7603"></a><!-- doxytag: member="fat.c::fat_create_dir" ref="gff3b524066c9a937fae32771c80e7603" args="(struct fat_dir_struct *parent, const char *dir, struct fat_dir_entry_struct *dir_entry)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">uint8_t fat_create_dir </td> <td>(</td> <td class="paramtype">struct fat_dir_struct * </td> <td class="paramname"> <em>parent</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>dir</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> * </td> <td class="paramname"> <em>dir_entry</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table></div><div class="memdoc"><p>Creates a directory. <p>Creates a directory and obtains its directory entry. If the directory to create already exists, its directory entry will be returned within the dir_entry parameter.<p><dl class="note" compact><dt><b>Note:</b></dt><dd>The notes which apply to fat_create_file also apply to this function.</dd></dl><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>parent</em> </td><td>The handle of the parent directory of the new directory. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>dir</em> </td><td>The name of the directory to create. </td></tr> <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>dir_entry</em> </td><td>The directory entry to fill for the new directory. </td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl><dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat__dir.html#gc0b6889e84a48b2d69fd681e5ac2e772" title="Deletes a directory.">fat_delete_dir</a> </dd></dl></div></div><p><a class="anchor" name="gc0b6889e84a48b2d69fd681e5ac2e772"></a><!-- doxytag: member="fat.c::fat_delete_dir" ref="gc0b6889e84a48b2d69fd681e5ac2e772" args="(struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">uint8_t fat_delete_dir </td> <td>(</td> <td class="paramtype">struct fat_fs_struct * </td> <td class="paramname"> <em>fs</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> * </td> <td class="paramname"> <em>dir_entry</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table></div><div class="memdoc"><p>Deletes a directory. <p>This is just a synonym for <a class="el" href="group__fat__file.html#g46055219b942eb8d57ffae9dc6447e7c" title="Deletes a file or directory.">fat_delete_file()</a>. If a directory is deleted without first deleting its subdirectories and files, disk space occupied by these files will get wasted as there is no chance to release it and mark it as free.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>fs</em> </td><td>The filesystem on which to operate. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>dir_entry</em> </td><td>The directory entry of the directory to delete. </td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl><dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat.html#gff3b524066c9a937fae32771c80e7603" title="Creates a directory.">fat_create_dir</a> </dd></dl></div></div><p><a class="anchor" name="gc7a5b4ad0b972759a965e1afd5bbc87c"></a><!-- doxytag: member="fat.c::fat_open_dir" ref="gc7a5b4ad0b972759a965e1afd5bbc87c" args="(struct fat_fs_struct *fs, const struct fat_dir_entry_struct *dir_entry)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">struct fat_dir_struct* fat_open_dir </td> <td>(</td> <td class="paramtype">struct fat_fs_struct * </td> <td class="paramname"> <em>fs</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> * </td> <td class="paramname"> <em>dir_entry</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [read]</code></td> </tr> </table></div><div class="memdoc"><p>Opens a directory. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>fs</em> </td><td>The filesystem on which the directory to open resides. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>dir_entry</em> </td><td>The directory entry which stands for the directory to open. </td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>An opaque directory descriptor on success, 0 on failure. </dd></dl><dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat.html#g2fed74d916370428e3dcf278e7050111" title="Closes a directory descriptor.">fat_close_dir</a> </dd></dl></div></div><p><a class="anchor" name="gb4bc79452dbf5ac2a2f3e1fccafd9534"></a><!-- doxytag: member="fat.c::fat_read_dir" ref="gb4bc79452dbf5ac2a2f3e1fccafd9534" args="(struct fat_dir_struct *dd, struct fat_dir_entry_struct *dir_entry)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">uint8_t fat_read_dir </td> <td>(</td> <td class="paramtype">struct fat_dir_struct * </td> <td class="paramname"> <em>dd</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct <a class="el" href="structfat__dir__entry__struct.html">fat_dir_entry_struct</a> * </td> <td class="paramname"> <em>dir_entry</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table></div><div class="memdoc"><p>Reads the next directory entry contained within a parent directory. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>dd</em> </td><td>The descriptor of the parent directory from which to read the entry. </td></tr> <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>dir_entry</em> </td><td>Pointer to a buffer into which to write the directory entry information. </td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl><dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat.html#g2d74af47cb9fd44f7c974834f810225f" title="Resets a directory handle.">fat_reset_dir</a> </dd></dl></div></div><p><a class="anchor" name="g2d74af47cb9fd44f7c974834f810225f"></a><!-- doxytag: member="fat.c::fat_reset_dir" ref="g2d74af47cb9fd44f7c974834f810225f" args="(struct fat_dir_struct *dd)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">uint8_t fat_reset_dir </td> <td>(</td> <td class="paramtype">struct fat_dir_struct * </td> <td class="paramname"> <em>dd</em> </td> <td> ) </td> <td></td> </tr> </table></div><div class="memdoc"><p>Resets a directory handle. <p>Resets the directory handle such that reading restarts with the first directory entry.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>dd</em> </td><td>The directory handle to reset. </td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl><dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat.html#gb4bc79452dbf5ac2a2f3e1fccafd9534" title="Reads the next directory entry contained within a parent directory.">fat_read_dir</a> </dd></dl></div></div><p></div><hr size="1"><address style="text-align: right;"><small>Generated on Mon Mar 30 18:27:54 2009 for sd-reader by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -