}
File directory = dirResource.getUnderlyingResourceObject();
FileAlterationObserver observer = new FileAlterationObserver(directory, filter);
try
{
observer.initialize();
}
catch (Exception e)
{
log.log(Level.SEVERE, "Error while initializing File observer", e);
}