Package com.google.devtools.depan.filesystem.graph

Examples of com.google.devtools.depan.filesystem.graph.FileElement


  private void processRoot(String treePath) throws IOException {
    File treeFile = new File(treePath);

    // If it is just a file, it's pretty uninteresting - one node
    if (treeFile.isFile()) {
      FileElement fileNode = visitFile(treeFile);
      getBuilder().newNode(fileNode);
      return;
    }

    // If it's a directory, traverse the full tree
View Full Code Here


    return new DirectoryElement(dirPath);
  }

  private FileElement createFile(File file) throws IOException {
    String filePath = getElementPath(file);
    return new FileElement(filePath);
  }
View Full Code Here

    super(path);
  }

  @Override
  public GraphNode createNode() {
    return new FileElement(getFilePath().getPath());
  }
View Full Code Here

    return super.visitDirectory(treeFile);
  }

  @Override
  protected FileElement visitFile(File treeFile) throws IOException {
    FileElement fileNode = super.visitFile(treeFile);

    if (treeFile.getName().endsWith(".class")) {
      FileInputStream content = new FileInputStream(treeFile);
      reader.readClassFile(getBuilder(), fileNode, content);
    }
View Full Code Here

    if (entry.isDirectory()) {
      // Ensure directory name is in canonical form
      String dirName = new File(entry.getName()).getPath();
      return new DirectoryElement(dirName);
    }
    return new FileElement(entry.getName());
  }
View Full Code Here

TOP

Related Classes of com.google.devtools.depan.filesystem.graph.FileElement

Copyright © 2018 www.massapicom. 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.