6 #include <util/DoublyLinkedList.h>
15 class Directory
: public Node
{
17 Directory(Volume
*volume
);
20 virtual status_t
Link(Entry
*entry
);
21 virtual status_t
Unlink(Entry
*entry
);
23 virtual status_t
SetSize(off_t newSize
);
24 virtual off_t
GetSize() const;
26 Directory
*GetParent() const;
28 status_t
CreateDirectory(const char *name
, Directory
**directory
);
29 status_t
CreateFile(const char *name
, File
**file
);
30 status_t
CreateSymLink(const char *name
, const char *path
,
33 bool IsEmpty() const { return fEntries
.IsEmpty(); }
35 status_t
AddEntry(Entry
*entry
);
36 status_t
CreateEntry(Node
*node
, const char *name
, Entry
**entry
= NULL
);
37 status_t
RemoveEntry(Entry
*entry
);
38 status_t
DeleteEntry(Entry
*entry
);
40 status_t
FindEntry(const char *name
, Entry
**entry
) const;
41 status_t
FindNode(const char *name
, Node
**node
) const;
42 status_t
FindAndGetNode(const char *name
, Node
**node
,
43 Entry
**entry
= NULL
) const;
45 status_t
GetPreviousEntry(Entry
**entry
) const;
46 status_t
GetNextEntry(Entry
**entry
) const;
49 virtual void GetAllocationInfo(AllocationInfo
&info
);
52 status_t
_CreateCommon(Node
*node
, const char *name
);
55 DoublyLinkedList
<Entry
> fEntries
;