Represents a live or non-live file system query. More...
Public Member Functions | |
| virtual int32 | CountEntries () |
| Returns the number of entries in the list. | |
| virtual int32 | GetNextDirents (struct dirent *buffer, size_t length, int32 count=INT_MAX) |
| Returns the BEntryList's next entries as dirent structures. | |
| virtual status_t | GetNextEntry (BEntry *entry, bool traverse=false) |
| Returns the BEntryList's next entry as a BEntry. | |
| virtual status_t | GetNextRef (entry_ref *ref) |
| Returns the BEntryList's next entry as an entry_ref. | |
| virtual status_t | Rewind () |
| Rewinds the list pointer to the beginning of the list. | |
Represents a live or non-live file system query.
Provides an interface for creating file system queries. Implements the BEntryList for iterating through the found entries.
| virtual int32 BQuery::CountEntries | ( | ) | [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). |
Implements BEntryList.
| virtual int32 BQuery::GetNextDirents | ( | struct dirent * | buf, |
| size_t | length, | ||
| int32 | count = INT_MAX |
||
| ) | [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. |
Implements BEntryList.
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). |
Implements BEntryList.
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). |
Implements BEntryList.
| virtual status_t BQuery::Rewind | ( | ) | [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). |
Implements BEntryList.