Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 451 Bytes

Readme.adoc

File metadata and controls

22 lines (18 loc) · 451 Bytes

FSEventsWrapper

A wrapper around FSEvents raw C APIs.

Installation

Use SPM.

How to Use?

/* 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)
   }
}