1 /* 2 * Copyright 2011, Jérôme Duval, korli@users.berlios.de. 3 * This file may be used under the terms of the MIT License. 4 */ 5 #ifndef DIRECTORYITERATOR_H 6 #define DIRECTORYITERATOR_H 7 8 9 #include "BPlusTree.h" 10 #include "Inode.h" 11 12 13 class DirectoryIterator { 14 public: 15 DirectoryIterator(Inode* inode); 16 ~DirectoryIterator(); 17 18 status_t InitCheck(); 19 20 status_t GetNext(char* name, size_t* _nameLength, ino_t* _id); 21 status_t Lookup(const char* name, size_t nameLength, ino_t* _id); 22 status_t Rewind(); 23 private: 24 uint64 fOffset; 25 Inode* fInode; 26 TreeIterator* fIterator; 27 }; 28 29 30 #endif // DIRECTORYITERATOR_H 31