BEntryList

Member Functions

CountEntries()

virtual int32 BEntryList::CountEntries() = 0

Returns the number of entries that are in the entry list.

Warning

For BQuery this is a no-op. Also, BDirectory’s implementation manipulates the entry list pointer; thus, you shouldn’t call CountEntries() while you’re iterating through the directory’s entries.

GetNextEntry(), GetNextRef(), GetNextDirents()

virtual status_t BEntryList::GetNextEntry(BEntry *entry, bool traverse = false) = 0
virtual status_t BEntryList::GetNextRef(entry_ref *ref) = 0
virtual int32 BEntryList::GetNextDirents(dirent *buf, size_t bufsize, int32 count = INT_MAX) = 0

These functions return the “next” entry in the entry list as a BEntry, entry_ref, or dirent structure. The end of the list is signalled by…

  • GetNextEntry() and GetNextRef() return B_ENTRY_NOT_FOUND.

  • GetNextDirents() returns 0.

If the traverse argument is true, symlinks are traversed.

See the class overview for more information.

Rewind()

virtual status_t BEntryList::Rewind() = 0

Rewinds the entry list pointer so it points to the first element in the list.

Warning

For BQuery this is a no-op.