Skip to content

calcit-lang/calcit-fswatch

Repository files navigation

Calcit binding for fswatch

internally it calls Rust notify to watch the folder.

API 设计: calcit-lang/calcit#116 .

Usages

APIs:

fswatch.core/fswatch!
  {}
    :path |folder/
    :duration 200
  fn (event)
    println event

Install to ~/.config/calcit/modules/, compile and provide *.{dylib,so} file with ./build.sh.

Not all events from fswatch are exposed, currently only:

  • :wrote
  • :created
  • :removed
  • :renamed

a demo of event data:

{}
  :type :wrote
  :path |folder/demo.cirru

Workflow

https://github.com/calcit-lang/dylib-workflow

License

MIT