xref: /haiku/src/add-ons/kernel/file_systems/xfs/Directory.h (revision 52c4471a3024d2eb81fe88e2c3982b9f8daa5e56)
1 /*
2  * Copyright 2020, Shubham Bhagat, shubhambhagat111@yahoo.com
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 #ifndef _DIRECTORY_H_
6 #define _DIRECTORY_H_
7 
8 
9 #include "Inode.h"
10 
11 
12 /*
13  * This class should act as a layer between any kind of directory
14  * and the kernel interface
15  */
16 class DirectoryIterator {
17 public:
18 			virtual						~DirectoryIterator()							=	0;
19 
20 			virtual	status_t			GetNext(char* name, size_t* length,
21 											xfs_ino_t* ino)								=	0;
22 
23 			virtual	status_t			Lookup(const char* name, size_t length,
24 											xfs_ino_t* id)								=	0;
25 
26 			static DirectoryIterator*	Init(Inode* inode);
27 };
28 
29 
30 #endif
31