Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

= FSEventsWrapper
François Lamboley

A 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)
}
}
----