1 //---------------------------------------------------------------------- 2 // This software is part of the OpenBeOS distribution and is covered 3 // by the OpenBeOS license. 4 //--------------------------------------------------------------------- 5 /*! 6 \file EntryList.cpp 7 BEntryList implementation. 8 */ 9 10 #include <EntryList.h> 11 12 // constructor 13 //! Creates a BEntryList. 14 /*! Does nothing at this time. 15 */ 16 BEntryList::BEntryList() 17 { 18 } 19 20 // destructor 21 //! Frees all resources associated with this BEntryList. 22 /*! Does nothing at this time. 23 */ 24 BEntryList::~BEntryList() 25 { 26 } 27 28 // GetNextEntry 29 /*! \fn status_t BEntryList::GetNextEntry(BEntry *entry, bool traverse) 30 \brief Returns the BEntryList's next entry as a BEntry. 31 Places the next entry in the list in \a entry, traversing symlinks if 32 \a traverse is \c true. 33 \param entry a pointer to a BEntry to be initialized with the found entry 34 \param traverse specifies whether to follow it, if the found entry 35 is a symbolic link. 36 \note The iterator used by this method is the same one used by 37 GetNextRef(), GetNextDirents(), Rewind() and CountEntries(). 38 \return 39 - \c B_OK if successful, 40 - \c B_ENTRY_NOT_FOUND when at the end of the list, 41 - another error code (depending on the implementation of the derived class) 42 if an error occured. 43 */ 44 45 // GetNextRef 46 /*! \fn status_t BEntryList::GetNextRef(entry_ref *ref) 47 \brief Returns the BEntryList's next entry as an entry_ref. 48 Places an entry_ref to the next entry in the list into \a ref. 49 \param ref a pointer to an entry_ref to be filled in with the data of the 50 found entry 51 \note The iterator used by this method is the same one used by 52 GetNextEntry(), GetNextDirents(), Rewind() and CountEntries(). 53 \return 54 - \c B_OK if successful, 55 - \c B_ENTRY_NOT_FOUND when at the end of the list, 56 - another error code (depending on the implementation of the derived class) 57 if an error occured. 58 */ 59 60 // GetNextDirents 61 /*! \fn int32 BEntryList::GetNextDirents(struct dirent *buf, size_t length, int32 count) 62 \brief Returns the BEntryList's next entries as dirent structures. 63 Reads a number of entries into the array of dirent structures pointed to by 64 \a buf. Reads as many but no more than \a count entries, as many entries as 65 remain, or as many entries as will fit into the array at \a buf with given 66 length \a length (in bytes), whichever is smallest. 67 \param buf a pointer to a buffer to be filled with dirent structures of 68 the found entries 69 \param length the maximal number of entries to be read. 70 \note The iterator used by this method is the same one used by 71 GetNextEntry(), GetNextRef(), Rewind() and CountEntries(). 72 \return 73 - The number of dirent structures stored in the buffer, 0 when there are 74 no more entries to be read. 75 - an error code (depending on the implementation of the derived class) 76 if an error occured. 77 */ 78 79 // Rewind 80 /*! \fn status_t BEntryList::Rewind() 81 \brief Rewinds the list pointer to the beginning of the list. 82 \return 83 - \c B_OK if successful, 84 - an error code (depending on the implementation of the derived class) 85 if an error occured. 86 */ 87 88 // CountEntries 89 /*! \fn int32 BEntryList::CountEntries() 90 \brief Returns the number of entries in the list 91 \return 92 - the number of entries in the list, 93 - an error code (depending on the implementation of the derived class) 94 if an error occured. 95 */ 96 97 98 /*! Currently unused */ 99 void BEntryList::_ReservedEntryList1() {} 100 void BEntryList::_ReservedEntryList2() {} 101 void BEntryList::_ReservedEntryList3() {} 102 void BEntryList::_ReservedEntryList4() {} 103 void BEntryList::_ReservedEntryList5() {} 104 void BEntryList::_ReservedEntryList6() {} 105 void BEntryList::_ReservedEntryList7() {} 106 void BEntryList::_ReservedEntryList8() {} 107 108 109 110 111