mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +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:
@@ -37,20 +37,6 @@ FileSystem* FileSystem::fromID(dword id)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
String FileSystem::name_of_child_in_directory(InodeIdentifier parent, InodeIdentifier child) const
|
||||
{
|
||||
String name;
|
||||
bool success = enumerateDirectoryInode(parent, [&] (auto& entry) {
|
||||
if (entry.inode == child) {
|
||||
name = entry.name;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
ASSERT(success);
|
||||
return name;
|
||||
}
|
||||
|
||||
ByteBuffer CoreInode::read_entire(FileDescriptor* descriptor)
|
||||
{
|
||||
return fs().readEntireInode(identifier(), descriptor);
|
||||
|
||||
Reference in New Issue
Block a user