List of usage examples for org.apache.commons.vfs2 FileName isDescendent
boolean isDescendent(FileName descendent);
From source file:org.metaborg.intellij.jps.projects.JpsProjectService.java
/** * Determines whether the specified file is equal to or a descendant of the specified path. * * @param ancestor The path./*w w w . ja v a2 s . co m*/ * @param descendant The descendant. * @return <code>true</code> when the file is equal to or a descendant of the path; * otherwise, <code>false</code>. */ private boolean isEqualOrDescendant(final String ancestor, final FileObject descendant) { final FileObject contentRoot = this.resourceService.resolve(ancestor); final FileName lhs = contentRoot.getName(); final FileName rhs = descendant.getName(); return lhs.equals(rhs) || lhs.isDescendent(rhs); }