paul-nameless / nim-fswatch

Nim wrapper for the libfswatch
GNU General Public License v3.0
18 stars 1 forks source link

Nim fswatch

Nim binding to libfswatch

Install

brew install fswatch
nimble install libfswatch

Usage

import libfswatch
import libfswatch/fswatch

proc callback(event: fsw_cevent, event_num: cuint) =
  echo event.path

var mon = newMonitor()

mon.addPath("/tmp/test/")
mon.setCallback(callback)

mon.start()