soh335 / FileWatch

Simple FSEvents wrapper for Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Carthage compatible

FileWatch

Simple FSEvents wrapper for Swift

INSTALL

CARTHAGE

  • Add github "soh335/FileWatch" to your Cartfile.
  • Run carthage update.
  • Add FileWatch.framework to Embedded Binaries.

USAGE

import FileWatch

let filewatch = try! FileWatch(paths: ["/path/to/dir"],  createFlag: [.UseCFTypes, .FileEvents], runLoop: RunLoop.current, latency: 3.0, eventHandler: { event in
    if event.flag.contains(.ItemIsFile) {
      debugPrint(event.path)
    }
})

LICENSE

  • MIT

About

Simple FSEvents wrapper for Swift

License:MIT License


Languages

Language:Swift 100.0%