filebot/website/data/shell/watcher.groovy

9 lines
311 B
Groovy
Raw Normal View History

2011-12-01 17:06:51 +00:00
def dirs = args.getFolders()
// watch folders and print files that were added/modified (requires Java 7)
dirs.watch { println "Batch: " + it } // default commit delay is 5 minutes
dirs.watch { println "Quick: " + it }.setCommitDelay(100) // 100 ms commit delay
println "Waiting for events"
console.readLine()