@Override public String toString() { return node.getName(); } }
/** @return last extension of the file name, without the dot. */ public String getExtension() { String name; int idx; name = getName(); idx = name.lastIndexOf('.'); if (idx <= 0 || idx == name.length() - 1) { return ""; } return name.substring(idx + 1); }
@Override public void run() { console.info.println("Cleaning up ..."); for (Node dir : dirs) { try { console.verbose.println("trying to remove " + dir.getName()); dir.deleteTreeOpt(); } catch (IOException e) { console.verbose.println(e.getMessage()); } } console.info.println("done."); } }
public void copyInto(Node directory) throws ExistsException, NodeNotFoundException, CopyException { directory.checkDirectory(); copy(directory.join(getName())); }
public void moveInto(Node directory) throws ExistsException, NodeNotFoundException, MoveException { directory.checkDirectory(); move(directory.join(getName())); }
private void rotateLogs(Stage stage) throws IOException { Node archived; for (Node logfile : stage.getBackstage().find("**/*.log")) { archived = archiveDirectory(logfile).join(logfile.getName() + ".gz"); console.verbose.println(String.format("rotating %s to %s", logfile.getRelative(stage.getBackstage()), archived.getRelative(stage.getBackstage()))); logfile.gzip(archived); logfile.deleteFile(); } }
currentDepth++; for (Node child : children) { name = child.getName(); childIsLink = child.isLink(); remainingIncludes = new ArrayList<>();
boolean isDir; name = src.node.getName(); dest = null; try {