public void moveInto(Node directory) throws ExistsException, NodeNotFoundException, MoveException { directory.checkDirectory(); move(directory.join(getName())); }
public void copyInto(Node directory) throws ExistsException, NodeNotFoundException, CopyException { directory.checkDirectory(); copy(directory.join(getName())); }
/** @return Target files or directories created. */ public List<Node> directory(Node destdir) throws DirectoryNotFoundException, CopyException { List<Node> result; TreeAction action; Tree tree; result = new ArrayList<>(); try { sourcedir.checkDirectory(); destdir.checkDirectory(); action = new TreeAction(); filter.invoke(sourcedir, action); } catch (DirectoryNotFoundException e) { throw e; } catch (IOException e) { throw new CopyException(sourcedir, destdir, "scanning source files failed", e); } tree = action.getResult(); if (tree != null) { for (Tree child : tree.children) { copy(sourcedir, destdir, child, result, rootVariables); } } return result; }
public String directory(Node leftdir, Node rightdir, List<String> paths) throws IOException { StringBuilder result; Node left; Node right; result = new StringBuilder(); leftdir.checkDirectory(); rightdir.checkDirectory(); for (String path : paths) { left = leftdir.join(path); right = rightdir.join(path); if (left.isDirectory()) { if (right.isDirectory()) { // ok } else if (right.isFile()) { throw new IOException("TODO"); } else { if (brief) { header('A', path, result); } else { // TODO } } } else if (right.isDirectory()) { header("A", path, result); } else { file(left, right, path, result); } } return result.toString(); }
public void export(Node dest, long revision) throws IOException, SVNException { Exporter exporter; SVNRepository sub; SVNRepository repository; repository = root.getRepository(); this.checkDirectory(); dest.checkDirectory(); exporter = new Exporter(revision, dest); if (path.length() == 0) { sub = repository; } else { // repository updates has a target to restrict the result, but it supports // only one segment. So I have to create a new repository ... sub = SvnFilesystem.repository(getSvnurl(), root.getRepository().getAuthenticationManager()); } sub.update(revision, "", true, exporter, exporter); }