mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
FileSystem: Add a Custody class that represents a parent/child guardianship.
A custody is kind of a directory entry abstraction that represents a single entry in a parent directory that tells us the name of a child inode. The idea here is for path resolution to produce a chain of custody objects.
This commit is contained in:
parent
3a1d5fa112
commit
4cb87b1753
5 changed files with 141 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
#define O_CLOEXEC 02000000
|
||||
#define O_NOFOLLOW_NOERROR 0x4000000
|
||||
|
||||
class Custody;
|
||||
class Device;
|
||||
class FileDescriptor;
|
||||
|
||||
|
@ -96,6 +97,9 @@ public:
|
|||
|
||||
Device* get_device(unsigned major, unsigned minor);
|
||||
|
||||
Custody& root_custody();
|
||||
KResultOr<Retained<Custody>> resolve_path_to_custody(StringView path, Custody& base, int options = 0);
|
||||
|
||||
private:
|
||||
friend class FileDescriptor;
|
||||
|
||||
|
@ -115,4 +119,6 @@ private:
|
|||
RetainPtr<Inode> m_root_inode;
|
||||
Vector<OwnPtr<Mount>> m_mounts;
|
||||
HashMap<dword, Device*> m_devices;
|
||||
|
||||
RetainPtr<Custody> m_root_custody;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue