mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:18:11 +00:00
Add CoreInode::reverse_lookup().
Getting the absolute path of an ext2fs inode now uses the lookup cache which makes it a lot faster.
This commit is contained in:
parent
5f434bc00b
commit
eced5f11e3
7 changed files with 61 additions and 74 deletions
|
@ -43,7 +43,6 @@ public:
|
|||
InodeIdentifier inode;
|
||||
byte fileType { 0 };
|
||||
};
|
||||
virtual bool enumerateDirectoryInode(InodeIdentifier, Function<bool(const DirectoryEntry&)>) const = 0;
|
||||
|
||||
virtual bool set_mtime(InodeIdentifier, dword timestamp) = 0;
|
||||
virtual InodeIdentifier create_inode(InodeIdentifier parentInode, const String& name, Unix::mode_t, unsigned size) = 0;
|
||||
|
@ -54,7 +53,6 @@ public:
|
|||
virtual RetainPtr<CoreInode> get_inode(InodeIdentifier) const = 0;
|
||||
|
||||
ByteBuffer readEntireInode(InodeIdentifier, FileDescriptor* = nullptr) const;
|
||||
String name_of_child_in_directory(InodeIdentifier parent, InodeIdentifier child) const;
|
||||
|
||||
protected:
|
||||
FileSystem();
|
||||
|
@ -85,7 +83,7 @@ public:
|
|||
virtual Unix::ssize_t read_bytes(Unix::off_t, Unix::size_t, byte* buffer, FileDescriptor*) = 0;
|
||||
virtual bool traverse_as_directory(Function<bool(const FileSystem::DirectoryEntry&)>) = 0;
|
||||
virtual InodeIdentifier lookup(const String& name) = 0;
|
||||
|
||||
virtual String reverse_lookup(InodeIdentifier) = 0;
|
||||
|
||||
protected:
|
||||
CoreInode(FileSystem& fs, unsigned index)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue