xref: /haiku/src/add-ons/kernel/file_systems/packagefs/volume/PackagesDirectory.h (revision aeb6fc9eca1b3684f835b648e44ca877e29296ab)
1 /*
2  * Copyright 2009-2014, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef PACKAGES_DIRECTORY_H
6 #define PACKAGES_DIRECTORY_H
7 
8 
9 #include <sys/stat.h>
10 
11 #include <Referenceable.h>
12 
13 
14 class PackagesDirectory : public BReferenceable {
15 public:
16 								PackagesDirectory();
17 								~PackagesDirectory();
18 
19 			const char*			Path() const
20 									{ return fPath; }
21 			int					DirectoryFD() const
22 									{ return fDirFD; }
23 			dev_t				DeviceID() const
24 									{ return fDeviceID; }
25 			ino_t				NodeID() const
26 									{ return fNodeID; }
27 
28 			status_t			Init(const char* path, dev_t mountPointDeviceID,
29 									ino_t mountPointNodeID, struct stat& _st);
30 
31 private:
32 			char*				fPath;
33 			int					fDirFD;
34 			dev_t				fDeviceID;
35 			ino_t				fNodeID;
36 };
37 
38 
39 #endif	// PACKAGES_DIRECTORY_H
40