Skip to content

Frizlab/FSEventsWrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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