diff options
author | sin-ack <sin-ack@users.noreply.github.com> | 2021-05-09 17:09:30 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-12 22:38:20 +0200 |
commit | 2159f90e00cdca66eedbbb0807b731c74695e5d8 (patch) | |
tree | e358620308619bc582308f42a0d1ff55df57a25e /Userland/Libraries/LibC/fcntl.h | |
parent | fe5ca6ca276ad452a16215031fb395b4f5bef048 (diff) | |
download | serenity-2159f90e00cdca66eedbbb0807b731c74695e5d8.zip |
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>
Diffstat (limited to 'Userland/Libraries/LibC/fcntl.h')
-rw-r--r-- | Userland/Libraries/LibC/fcntl.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Libraries/LibC/fcntl.h b/Userland/Libraries/LibC/fcntl.h index e4b120a9c8..b23df06e38 100644 --- a/Userland/Libraries/LibC/fcntl.h +++ b/Userland/Libraries/LibC/fcntl.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2021, sin-ack <sin-ack@protonmail.com> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -42,7 +43,9 @@ int open(const char* path, int options, ...); int openat(int dirfd, const char* path, int options, ...); int fcntl(int fd, int cmd, ...); -int watch_file(const char* path, size_t path_length); +int create_inode_watcher(unsigned flags); +int inode_watcher_add_watch(int fd, const char* path, size_t path_length, unsigned event_mask); +int inode_watcher_remove_watch(int fd, int wd); #define F_RDLCK 0 #define F_WRLCK 1 |