haiku-website/static/legacy-docs/bebook/BEntryList.html

35 lines
9.7 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Be Book - Classes And Methods - The Storage Kit</title><link rel="stylesheet" href="be_book.css" type="text/css" media="all" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./images/favicon.ico" /><!--[if IE]>
<link rel="stylesheet" type="text/css" href="be_book_ie.css" />
<![endif]--><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="Access, BeOS, BeBook, API" /><link rel="start" href="index.html" title="The Be Book" /><link rel="up" href="TheStorageKit.html" title="The Storage Kit" /><link rel="prev" href="BEntry.html" title="BEntry" /><link rel="next" href="BFile.html" title="BFile" /></head><body><div id="header"><div id="headerT"><div id="headerTL"><a accesskey="p" href="BEntry.html" title="BEntry"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a accesskey="u" href="TheStorageKit.html" title="The Storage Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a accesskey="n" href="BFile.html" title="BFile"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="headerTR"><div id="navigpeople"><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div><div class="navigboxed" id="navigindex"><a accesskey="i" href="ClassIndex.html" title="Index">I</a></div><div class="navigboxed" id="naviglang" title="English">en</div></div><div id="headerTC">The Be Book - Classes And Methods - The Storage Kit</div></div><div id="headerB">Prev: <a href="BEntry.html">BEntry</a>  Up: <a href="TheStorageKit.html">The Storage Kit</a>  Next: <a href="BFile.html">BFile</a></div><hr /></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h2 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BEntryList"></a>BEntryList</h2></div></div></div><a id="id1231926" class="indexterm"></a><div class="classheader"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td><table width="100%" border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Derived From:</td><td>None</td></tr><tr><td>Mix-in Classes:</td><td>None</td></tr><tr><td>Declared In:</td><td><code class="filename">storage/EntryList.h</code></td></tr><tr><td>Library:</td><td> </td></tr><tr><td>Allocation:</td><td></td></tr></tbody></table></td><td>
<a class="link overview" href="BEntryList_Overview.html" title="BEntryList">Class Overview</a>
<div class="toc"><ul><li><span class="section"><a href="BEntryList.html#BEntryList_MemberFunctions">Member Functions</a></span></li></ul></div>
</td></tr></tbody></table></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BEntryList_MemberFunctions"></a>Member Functions</h3></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BEntryList_CountEntries"></a>CountEntries()</h4></div></div></div><code class="methodsynopsis cpp"><span class="modifier">virtual </span><span class="type">int32 </span><span class="methodname">CountEntries</span>() <span class="modifier">= 0</span>;</code><p>
Returns the number of entries that are in the entry list.
</p><div class="admonition warning"><div class="title">Warning</div><div class="graphic"><img class="icon" alt="Warning" width="32" src="./images/admonitions/Stop_32.png" /><div class="text"><p>For <a class="link" href="BQuery.html" title="BQuery"><code class="classname">BQuery</code></a>
this is a no-op. Also,
<a class="link" href="BDirectory.html" title="BDirectory"><code class="classname">BDirectory</code></a>'s implementation
manipulates the entry list pointer; thus, you shouldn't call
<code class="methodname">CountEntries()</code> while you're iterating through the directory's entries.</p></div></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BEntryList_GetNextEntry"></a><a id="BEntryList_GetNextRef"></a>
<a id="BEntryList_GetNextDirents"></a>
GetNextEntry(), GetNextRef(), GetNextDirents()</h4></div></div></div><code class="methodsynopsis cpp"><span class="modifier">virtual </span><span class="type">status_t </span><span class="methodname">GetNextEntry</span>(<span class="methodparam"><span class="type"><a class="link" href="BEntry.html" title="BEntry"><code class="classname">BEntry</code></a>* </span><span class="parameter">entry</span></span>,<br />                              <span class="methodparam"><span class="type">bool </span><span class="parameter">traverse</span><span class="initializer"> = <span class="constant">false</span></span></span>) <span class="modifier">= 0</span>;</code><code class="methodsynopsis cpp"><span class="modifier">virtual </span><span class="type">status_t </span><span class="methodname">GetNextRef</span>(<span class="methodparam"><span class="type">entry_ref* </span><span class="parameter">ref</span></span>) <span class="modifier">= 0</span>;</code><code class="methodsynopsis cpp"><span class="modifier">virtual </span><span class="type">int32 </span><span class="methodname">GetNextDirents</span>(<span class="methodparam"><span class="type">dirent* </span><span class="parameter">buf</span></span>,<br />                             <span class="methodparam"><span class="type">size_t </span><span class="parameter">bufsize</span></span>,<br />                             <span class="methodparam"><span class="type">int32 </span><span class="parameter">count</span><span class="initializer"> = <span class="constant">INT_MAX</span></span></span>) <span class="modifier">= 0</span>;</code><p>
These functions return the "next" entry in the entry list as a
<a class="link" href="BEntry.html" title="BEntry"><code class="classname">BEntry</code></a>,
<span class="type">entry_ref</span>, or <span class="type">dirent</span> structure. The end of the list is signalled by…
</p><ul class="itemizedlist"><li><p>
<code class="methodname">GetNextEntry()</code> and <code class="methodname">GetNextRef()</code>
return <code class="constant">B_ENTRY_NOT_FOUND</code>.
</p></li><li><p>
<code class="methodname">GetNextDirents()</code> returns 0.
</p></li></ul><p>
If the <code class="parameter">traverse</code> argument is <code class="constant">true</code>, symlinks are traversed.
</p><p>
See the <a class="link" href="BEntryList_Overview.html" title="BEntryList">class overview</a> for more information.
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BEntryList_Rewind"></a>Rewind()</h4></div></div></div><code class="methodsynopsis cpp"><span class="modifier">virtual </span><span class="type">status_t </span><span class="methodname">Rewind</span>() <span class="modifier">= 0</span>;</code><p>
Rewinds the entry list pointer so it points to the first element in the
list.
</p><div class="admonition warning"><div class="title">Warning</div><div class="graphic"><img class="icon" alt="Warning" width="32" src="./images/admonitions/Stop_32.png" /><div class="text"><p>For <a class="link" href="BQuery.html" title="BQuery"><code class="classname">BQuery</code></a> this is a no-op.</p></div></div></div></div></div></div><div id="footer"><hr /><div id="footerT">Prev: <a href="BEntry.html">BEntry</a>  Up: <a href="TheStorageKit.html">The Storage Kit</a>  Next: <a href="BFile.html">BFile</a> </div><div id="footerB"><div id="footerBL"><a href="BEntry.html" title="BEntry"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a href="TheStorageKit.html" title="The Storage Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a href="BFile.html" title="BFile"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="footerBR"><div><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div></div><div id="footerBC"><a href="http://www.access-company.com/home.html" title="ACCESS Co."><img alt="Access Company" src="./images/access_logo.png" /></a></div></div></div><div id="licenseFooter"><div id="licenseFooterBL"><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/" title="Creative Commons License"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by-nc-nd/3.0/88x31.png" /></a></div><div id="licenseFooterBR"><a href="./LegalNotice.html">Legal Notice</a></div><div id="licenseFooterBC"><span id="licenseText">This work is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative
Commons Attribution-Non commercial-No Derivative Works 3.0 License</a>.</span></div></div></body></html>