watch(path, callback, pattern = NULL, hash = TRUE)
character vector of paths to watch. Omit trailing backslash.
function called everytime a change occurs. It should have three parameters: added, deleted, modified, and should return TRUE to keep watching, or FALSE to stop.
file pattern passed to
hashes are more accurate at detecting changes, but are slower for large files. When FALSE, uses modification time stamps
Use Ctrl + break (windows), Esc (mac gui) or Ctrl + C (command line) to stop the watcher.