2 * Copyright 2011, Jérôme Duval, korli@users.berlios.de.
3 * Copyright 2014 Haiku, Inc. All rights reserved.
5 * Distributed under the terms of the MIT License.
8 * Jérôme Duval, korli@users.berlios.de
9 * John Scipione, jscipione@gmail.com
11 #ifndef DIRECTORYITERATOR_H
12 #define DIRECTORYITERATOR_H
15 #include "CachedBlock.h"
23 virtual ~EntryVisitor() {};
24 virtual bool VisitBitmap(struct exfat_entry
*)
26 virtual bool VisitUppercase(struct exfat_entry
*)
28 virtual bool VisitLabel(struct exfat_entry
*)
30 virtual bool VisitFilename(struct exfat_entry
*)
32 virtual bool VisitFile(struct exfat_entry
*)
34 virtual bool VisitFileInfo(struct exfat_entry
*)
39 class DirectoryIterator
{
41 DirectoryIterator(Inode
* inode
);
46 status_t
GetNext(char* name
, size_t* _nameLength
,
47 ino_t
* _id
, EntryVisitor
* visitor
= NULL
);
48 status_t
Lookup(const char* name
, size_t nameLength
,
50 status_t
LookupEntry(EntryVisitor
* visitor
);
53 void Iterate(EntryVisitor
&visitor
);
55 status_t
_GetNext(uint16
* unicodeName
,
56 size_t* _codeUnitCount
, ino_t
* _id
,
57 EntryVisitor
* visitor
= NULL
);
58 status_t
_NextEntry();
64 struct exfat_entry
* fCurrent
;
68 #endif // DIRECTORYITERATOR_H