classnetColarUtils::FileWatcher

sys::Obj
  netColarUtils::FileWatcher

FileWatcher Use to more efficiently watch files(currently rather directories) for changes It's basically on demand scanning with caching at this point (no threaded polling)

Maybe look into java 7 file watch API's that use native file watches

cache

Uri:Int cache := [Uri:Int][:]

Cache of File -> file last modif timestamp

changedDirs

Uri[] changedDirs(File dir, Int maxDepth := -1)

Find directories that have changed since last run Note: The first time it is run it will return all dirs as changed It's a good idea to provide a maxDepth whenever possible, this can greatly improve performance

const Bool followBreakoutLinks

Whether to follow file links beaking outside of their base directory

log

const static Log log := FileWatcher#.pod().log

make

new make(Bool followBreakoutLinks := true)

Create the file watcher followBreakoutLinks : Whether to follow file links beaking outside of their base directory