class NotificationEventPathFilter implements PathFilter {

    @Override
    public boolean accept(Path path) {
        return !(path == null || (toIgnoreHiddenFiles && path.getName().startsWith(".")))
                && watchDirectory.matcher(path.toString()).matches();
    }

      NotificationEventPathFilter(Pattern watchDirectory, boolean toIgnoreHiddenFiles);

}