mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 01:38:52 +00:00
Kernel: Remove Inode::directory_entry_count()
This was only used in one place: VirtualFileSystem::rmdir(), and that has now been converted to a simple directory traversal.
This commit is contained in:
parent
d1bbe8b652
commit
b8d6c3722d
Notes:
sideshowbarker
2024-07-18 08:51:17 +09:00
Author: https://github.com/awesomekling
Commit: b8d6c3722d
15 changed files with 0 additions and 92 deletions
|
@ -851,20 +851,6 @@ void Plan9FSInode::flush_metadata()
|
|||
// Do nothing.
|
||||
}
|
||||
|
||||
KResultOr<size_t> Plan9FSInode::directory_entry_count() const
|
||||
{
|
||||
size_t count = 0;
|
||||
KResult result = traverse_as_directory([&count](auto&) {
|
||||
count++;
|
||||
return true;
|
||||
});
|
||||
|
||||
if (result.is_error())
|
||||
return result;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
KResult Plan9FSInode::traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)> callback) const
|
||||
{
|
||||
KResult result = KSuccess;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue