// Entry.h #ifndef NET_FS_ENTRY_H #define NET_FS_ENTRY_H #include #include #include "EntryRef.h" class Directory; class Node; class Path; class Volume; // Entry class Entry : public DoublyLinkedListLinkImpl { public: Entry(Volume* volume, Directory* directory, const char* name, Node* node); ~Entry(); status_t InitCheck() const; Volume* GetVolume() const; Directory* GetDirectory() const; NoAllocEntryRef GetEntryRef() const; dev_t GetVolumeID() const; ino_t GetDirectoryID() const; const char* GetName() const; Node* GetNode() const; status_t GetPath(Path* path); bool Exists() const; bool IsActualEntry() const; private: struct GetDirEntryLink; friend struct GetDirEntryLink; friend class Directory; Volume* fVolume; Directory* fDirectory; HashString fName; Node* fNode; DoublyLinkedListLink fDirEntryLink; }; // GetDirEntryLink struct Entry::GetDirEntryLink { DoublyLinkedListLink* operator()(Entry* entry) const { return &entry->fDirEntryLink; } const DoublyLinkedListLink* operator()(const Entry* entry) const { return &entry->fDirEntryLink; } }; #endif // NET_FS_ENTRY_H