Implement watch exclusion lists
Some checks failed
Docs / docs (push) Has been cancelled
Docs / deploy (push) Has been cancelled

Allow exclusion of directories when watching recursively.
This commit is contained in:
T. R. Bernstein
2026-03-15 22:30:10 +01:00
parent c87099e4a7
commit 134e4e152d
8 changed files with 115 additions and 25 deletions

View File

@@ -20,6 +20,8 @@ Beyond single-directory watches, the library provides two higher-level methods f
- ``Inotify/Inotify/addRecursiveWatch(forDirectory:mask:)`` installs watches on every existing subdirectory at setup time.
- ``Inotify/Inotify/addWatchWithAutomaticSubtreeWatching(forDirectory:mask:)`` does the same **and** automatically watches subdirectories that are created after setup.
You can also exclude certain file or directory names so that they are skipped during directory resolution and silently dropped from the event stream. See ``Inotify/Inotify/exclude(names:)`` and <doc:WatchingDirectoryTrees> for details.
All public types conform to `Sendable`, so they can be safely passed across concurrency boundaries.
## Topics
@@ -30,6 +32,10 @@ All public types conform to `Sendable`, so they can be safely passed across conc
- ``InotifyEvent``
- ``InotifyEventMask``
### Articles
- <doc:WatchingDirectoryTrees>
### Errors
- ``InotifyError``