List of usage examples for org.eclipse.jgit.treewalk TreeWalk isPathPrefix
public int isPathPrefix(byte[] p, int pLen)
From source file:org.eclipse.tycho.extras.buildtimestamp.jgit.PathFilter.java
License:Open Source License
@Override public boolean include(TreeWalk tw) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (tw.isPathPrefix(basedir, basedir.length) != 0) { // not under basedir, not interesting return false; }//from www . j av a 2 s .com if (!tw.isSubtree() && rules != null) { String path = tw.getPathString(); for (IgnoreRule rule : rules) { if (rule.isMatch(path, tw.isSubtree())) { return !rule.getResult(); } } } return true; }