2 * Copyright 2003-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef ROOT_FILE_SYSTEM_H
6 #define ROOT_FILE_SYSTEM_H
10 #include <boot/partitions.h>
15 class RootFileSystem
: public Directory
{
18 virtual ~RootFileSystem();
20 virtual status_t
Open(void **_cookie
, int mode
);
21 virtual status_t
Close(void *cookie
);
23 virtual Node
* LookupDontTraverse(const char* name
);
25 virtual status_t
GetNextEntry(void *cookie
, char *nameBuffer
, size_t bufferSize
);
26 virtual status_t
GetNextNode(void *cookie
, Node
**_node
);
27 virtual status_t
Rewind(void *cookie
);
28 virtual bool IsEmpty();
30 status_t
AddVolume(Directory
*volume
, Partition
*partition
);
31 status_t
AddLink(const char *name
, Directory
*target
);
33 status_t
GetPartitionFor(Directory
*volume
, Partition
**_partition
);
36 struct entry
: public DoublyLinkedListLinkImpl
<entry
> {
41 typedef DoublyLinkedList
<entry
>::Iterator EntryIterator
;
42 typedef DoublyLinkedList
<entry
> EntryList
;
48 extern RootFileSystem
*gRoot
;
50 #endif /* ROOT_FILE_SYSTEM_H */