mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 01:38:52 +00:00
Add CoreInode::lookup() for directory lookups.
Also add a name-to-inode lookup cache to Ext2Inode. This seems like a great speedup for filesystem traversal.
This commit is contained in:
parent
8fa2d7104a
commit
5f434bc00b
Notes:
sideshowbarker
2024-07-19 16:10:32 +09:00
Author: https://github.com/awesomekling
Commit: 5f434bc00b
7 changed files with 48 additions and 18 deletions
|
@ -37,19 +37,6 @@ FileSystem* FileSystem::fromID(dword id)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
InodeIdentifier FileSystem::child_of_directory_inode_with_name(InodeIdentifier inode, const String& name) const
|
||||
{
|
||||
InodeIdentifier foundInode;
|
||||
enumerateDirectoryInode(inode, [&] (const DirectoryEntry& entry) {
|
||||
if (!strcmp(entry.name, name.characters())) {
|
||||
foundInode = entry.inode;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return foundInode;
|
||||
}
|
||||
|
||||
String FileSystem::name_of_child_in_directory(InodeIdentifier parent, InodeIdentifier child) const
|
||||
{
|
||||
String name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue