Interface for iterating through a list of filesystem entries. More...
#include <EntryList.h>
Inherited by BDirectory, and BQuery.
Public Member Functions | |
BEntryList () | |
Creates a BEntryList object. | |
virtual | ~BEntryList () |
Frees all resources associated with the BEntryList object. | |
virtual int32 | CountEntries ()=0 |
Returns the number of entries in the list. | |
virtual int32 | GetNextDirents (struct dirent *direntBuffer, size_t bufferSize, int32 maxEntries=INT_MAX)=0 |
Returns the BEntryList's next entries as dirent structures. | |
virtual status_t | GetNextEntry (BEntry *entry, bool traverse=false)=0 |
Returns the BEntryList's next entry as a BEntry. | |
virtual status_t | GetNextRef (entry_ref *ref)=0 |
Returns the BEntryList's next entry as an entry_ref. | |
virtual status_t | Rewind ()=0 |
Rewinds the list pointer to the beginning of the list. | |
Interface for iterating through a list of filesystem entries.
Interface for iterating through a list of filesystem entries Defines a general interface for iterating through a list of entries (i.e. files in a folder
Defines a general interface for iterating through a list of entries i.e. files in a folder.
BEntryList::BEntryList | ( | ) |
|
virtual |
|
pure virtual |
Returns the number of entries in the list.
B_OK | if successful |
B_ENTRY_NOT_FOUND | when at the end of the list |
B_ERROR | or another error code (depending on the implementation of the derived class). |
Implemented in BDirectory, and BQuery.
|
pure virtual |
Returns the BEntryList's next entries as dirent structures.
Reads a number of entries into the array of dirent structures pointed to by buf. Reads as many but no more than count entries, as many entries as remain, or as many entries as will fit into the array at buf with given length length (in bytes), whichever is smallest.
buf | A pointer to a buffer to be filled with dirent structures of the found entries. |
length | The length of the buf array. |
count | the maximum number of entries to be read. |
Implemented in BDirectory, and BQuery.
Returns the BEntryList's next entry as a BEntry.
Places the next entry in the list in entry, traversing symlinks if traverse is true
.
entry | a pointer to a BEntry to be initialized with the found entry. |
traverse | specifies whether to follow it, if the found entry is a symbolic link. |
B_OK | if successful |
B_ENTRY_NOT_FOUND | when at the end of the list |
B_ERROR | or another error code (depending on the implementation of the derived class). |
Implemented in BDirectory, and BQuery.
Returns the BEntryList's next entry as an entry_ref.
Places an entry_ref to the next entry in the list into ref.
ref | a pointer to an entry_ref to be filled in with the data of the found entry. |
B_OK | if successful |
B_ENTRY_NOT_FOUND | when at the end of the list |
B_ERROR | or another error code (depending on the implementation of the derived class). |
Implemented in BDirectory, and BQuery.
|
pure virtual |
Rewinds the list pointer to the beginning of the list.
B_OK | if successful |
B_ERROR | or another error code (depending on the implementation of the derived class). |
Implemented in BDirectory, and BQuery.