mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
Kernel: Add "child added" and "child removed" InodeWatcher events
The child name is not yet accessible to userspace, but will be in a future patch.
This commit is contained in:
parent
ea17d2d3da
commit
0d577ab781
Notes:
sideshowbarker
2024-07-19 05:11:34 +09:00
Author: https://github.com/awesomekling
Commit: 0d577ab781
6 changed files with 47 additions and 3 deletions
|
@ -215,6 +215,22 @@ void Inode::set_metadata_dirty(bool metadata_dirty)
|
|||
}
|
||||
}
|
||||
|
||||
void Inode::did_add_child(const String& name)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
for (auto& watcher : m_watchers) {
|
||||
watcher->notify_child_added({}, name);
|
||||
}
|
||||
}
|
||||
|
||||
void Inode::did_remove_child(const String& name)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
for (auto& watcher : m_watchers) {
|
||||
watcher->notify_child_removed({}, name);
|
||||
}
|
||||
}
|
||||
|
||||
KResult Inode::prepare_to_write_data()
|
||||
{
|
||||
// FIXME: It's a poor design that filesystems are expected to call this before writing out data.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue