GDirectoryModel: Automagically update on filesystem changes.

Use the new watch_file() mechanism to monitor the currently open directory
for changes and refresh the model when notified. This makes FileManager
automagically show newly added files. :^)
This commit is contained in:
Andreas Kling 2019-07-22 20:08:25 +02:00
commit 1511cac715
Notes: sideshowbarker 2024-07-19 13:05:25 +09:00
2 changed files with 14 additions and 0 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include <AK/HashMap.h>
#include <LibCore/CNotifier.h>
#include <LibGUI/GModel.h>
#include <sys/stat.h>
@ -77,4 +78,6 @@ private:
HashMap<uid_t, String> m_user_names;
HashMap<gid_t, String> m_group_names;
OwnPtr<CNotifier> m_notifier;
};