Examples of IVirtualPath


Examples of net.sourceforge.javautil.common.io.IVirtualPath

   
    String path = "".equals(this.name) ? "" : this.path.toString("/") + "/";
    int partCount = this.path.getPartCount() + 1;
    for (ZipEntry entry : this.getEntries()) {
      if (entry.getName().startsWith(path)) {
        IVirtualPath entryPath = new SimplePath(entry.getName());
       
        if ( (entryPath.getPartCount() == partCount && entry.getName().endsWith("/"))) {
          String name = entryPath.getPart(partCount-1);
          if (!this.directories.contains(name)) this.directories.add(name);
          continue;
        }
       
        IVirtualPath relativePath = entryPath.getPartCount() > partCount - 1 ? this.path.getRelativePath(entryPath) : entryPath;
        if (entryPath.getPartCount() > partCount && relativePath.getPartCount() > 0) {
          String name = relativePath.getPart(0);
          if (!this.directories.contains(name)) this.directories.add(name);
        } else if (entryPath.getPartCount() == partCount) {
          this.files.add(entryPath.getPart(partCount-1));
        }
      }
View Full Code Here

Examples of net.sourceforge.javautil.common.io.IVirtualPath

            return pattern.matcher(ctx.getVisited().getName()).matches() ? CollectResult.INCLUDED : CollectResult.DEFAULT;
          } else {
            return !pattern.matcher(ctx.getVisited().getName()).matches() ? CollectResult.EXCLUDED : CollectResult.DEFAULT;
          }
        case Path:
          IVirtualPath path = ctx.getVisitable().getRelativePath(ctx.getVisited());
          if (type == Type.Inclusion) {
            return pattern.matcher(path.toString("/")).matches() ? CollectResult.INCLUDED : CollectResult.DEFAULT;
          } else {
            return !pattern.matcher(path.toString("/")).matches() ? CollectResult.INCLUDED : CollectResult.DEFAULT;
          }
        default:
      }
      return CollectResult.DEFAULT;
    }
View Full Code Here

Examples of net.sourceforge.javautil.common.io.IVirtualPath

    if (pkgdir instanceof IVirtualDirectory) {
      Iterator<IVirtualArtifact> artifacts = ((IVirtualDirectory)pkgdir).getArtifacts();
      while (artifacts.hasNext()) {
        IVirtualArtifact artifact = artifacts.next();
        if (ClassNameUtil.isClassSource( artifact.getName() )) {
          IVirtualPath relative = directory.getRelativePath(artifact);
          classNames.add( ClassNameUtil.toClassName(relative.toString("/")) );
        }
      }
    }
   
    return classNames;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.