public void addWatch(FileWatcherUpdateInterface parent,Path path){
  if (path != null) {
    try {
      WatchKey key=path.register(watchService,StandardWatchEventKinds.ENTRY_CREATE,StandardWatchEventKinds.ENTRY_DELETE,StandardWatchEventKinds.ENTRY_MODIFY);
      watcherMap.put(key,parent);
    }
 catch (    IOException e) {
    }
  }
}

public void addWatch ( FileWatcherUpdateInterface parent , Path path ) { if ( path != null ) { try { WatchKey key = path . register ( watchService , StandardWatchEventKinds . ENTRY_CREATE , StandardWatchEventKinds . ENTRY_DELETE , StandardWatchEventKinds . ENTRY_MODIFY ) ; watcherMap . put ( key , parent ) ; } catch ( IOException e ) { } } }
instantiates a new file system watcher .
