Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Frizlab/FSEventsWrapper
Easily use FSEvents in Swift
https://github.com/Frizlab/FSEventsWrapper
fsevents macos spm swift
Last synced: 9 days ago
JSON representation
Easily use FSEvents in Swift
- Host: GitHub
- URL: https://github.com/Frizlab/FSEventsWrapper
- Owner: Frizlab
- License: mit
- Created: 2018-07-06T10:22:58.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-08-19T11:09:25.000Z (about 1 year ago)
- Last Synced: 2024-07-25T19:58:22.135Z (4 months ago)
- Topics: fsevents, macos, spm, swift
- Language: Swift
- Homepage:
- Size: 75.2 KB
- Stars: 24
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.adoc
- License: License.txt
Awesome Lists containing this project
README
= FSEventsWrapper
François LamboleyA wrapper around FSEvents raw C APIs.
== Installation
Use SPM.== How to Use?
[code,swift]
----
/* Using a standard callback. */
let w = FSEventStream(path: "awesome/path", callback: { stream, event in NSLog("%@", String(describing: event)) })
w?.startWatching()/* Or with an AsyncStream. */
Task{
for await event in FSEventAsyncStream(path: "awesome/path") {
print(event)
}
}
----