public boolean exclude(String path) {
        for (String exclude : excludes)
            if (path.startsWith(exclude))
                return true;
        for (Pattern excludeReg : excludeRegs)
            if (excludeReg.matcher(path).matches())
                return true;
        return false;
    }