mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
Userland+LibCore: Update FileWatcher + its users for InodeWatcher 2.0
With the new InodeWatcher API, the old style of creating a watcher per inode will no longer work. Therefore the FileWatcher API has been updated to support multiple watches, and its users have also been refactored to the new style. At the moment, all operations done on a (Blocking)FileWatcher return Result objects, however, this may be changed in the future if it becomes too obnoxious. :^) Co-authored-by: Gunnar Beutner <gunnar@beutner.name>
This commit is contained in:
parent
fe5ca6ca27
commit
2159f90e00
12 changed files with 403 additions and 140 deletions
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
|
||||
* Copyright (c) 2020, the SerenityOS developers.
|
||||
* Copyright (c) 2020-2021, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -122,7 +122,7 @@ private:
|
|||
RefPtr<EditorWrapper> m_current_editor_wrapper;
|
||||
|
||||
HashMap<String, NonnullRefPtr<ProjectFile>> m_open_files;
|
||||
HashMap<String, NonnullRefPtr<Core::FileWatcher>> m_file_watchers;
|
||||
RefPtr<Core::FileWatcher> m_file_watcher;
|
||||
Vector<String> m_open_files_vector; // NOTE: This contains the keys from m_open_files and m_file_watchers
|
||||
|
||||
OwnPtr<Project> m_project;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue