1 2 3 4 5 6 7 8
import("core.base.fwatcher") function main(watchdir) print("watch %s ..", watchdir) fwatcher.on_modified(watchdir, function (filepath) print(filepath, "modified") end) end