Stops the watcher and releases all resources. Called automatically during shutdown.
Sets the callback invoked when filesystem changes are detected.
Called with an array of changed paths and a parallel array of per-path flag string arrays.
self, for chaining
Watches a filesystem path for changes and invokes a callback when they occur.
Created via
hs.fs.createPathWatcher(path). Set a callback withsetCallback(), then callstart()to begin receiving events.The callback receives
(paths, flags):paths: array of changed file/directory pathsflags: parallel array of string arrays, one per path, describing what changedPossible flag values in each per-path array:
"itemCreated""itemRemoved""itemRenamed""itemModified""itemInodeMetaMod""itemFinderInfoMod""itemChangeOwner""itemXattrMod""itemIsFile""itemIsDir""itemIsSymlink""itemIsHardlink""itemIsLastHardlink""itemCloned""ownEvent""mustScanSubDirs""userDropped""kernelDropped""rootChanged""mount""unmount"