List of usage examples for org.eclipse.jgit.ignore IgnoreNode isIgnored
public MatchResult isIgnored(String entryPath, boolean isDirectory)
From source file:org.eclipse.orion.server.cf.utils.Packager.java
License:Open Source License
protected boolean isIgnored(IFileStore source, IPath path, boolean isDirectory) throws CoreException { /* look for inherited rules up to the base node */ if (!base.isParentOf(source) && !base.equals(source)) return false; IgnoreNode node = cfIgnore.get(source.toURI()); if (node == null) return isIgnored(source.getParent(), path, isDirectory); IFileStore pathStore = base.getFileStore(path); URI relativeURI = URIUtil.makeRelative(pathStore.toURI(), source.toURI()); switch (node.isIgnored(relativeURI.toString(), isDirectory)) { case IGNORED: return true; case NOT_IGNORED: return false; case CHECK_PARENT: /* fall over */ break;/*from w w w . j a va 2 s. c o m*/ } return isIgnored(source.getParent(), path, isDirectory); }