private void traverseAndRun()

in changes-patch-builder/src/jetbrains/buildServer/vcs/patches/fs/MemoryFileSystemImpl.java [360:369]


  private void traverseAndRun(Node node, StringBuilder fullPath, NodeVisitor visitor) {
    visitor.visit(node, fullPath.toString());
    int length = fullPath.length();
    for (Edge edge : node.children.values()) {
      fullPath.append(length > 0 ? "/" : "")      // add a separator (except for the leading one)
        .append(edge.value);                // add current edge value
      traverseAndRun(edge.to, fullPath, visitor);
      fullPath.setLength(length);                 // restore the previous value
    }
  }