@Override public boolean isRecursive(final Path source, final Path copy) { try { if(registry.find(session, source, false).equals(Vault.DISABLED)) { return registry.find(session, copy, false).getFeature(session, Copy.class, proxy).withTarget(destination).isRecursive(source, copy); } else if(registry.find(session, copy, false).equals(Vault.DISABLED)) { return registry.find(session, source, false).getFeature(session, Copy.class, proxy).withTarget(destination).isRecursive(source, copy); } return registry.find(session, copy).getFeature(session, Copy.class, proxy).withTarget(destination).isRecursive(source, copy); } catch(VaultUnlockCancelException e) { return proxy.isRecursive(source, copy); } }
@Override public boolean isRecursive(final Path source, final Path target) { if(Boolean.valueOf(containerService.getContainer(source).attributes().getCustom().get(SDSAttributesFinderFeature.KEY_ENCRYPTED)) ^ Boolean.valueOf(containerService.getContainer(target).attributes().getCustom().get(SDSAttributesFinderFeature.KEY_ENCRYPTED))) { return session.getFeature(Copy.class).isRecursive(source, target); } return proxy.isRecursive(source, target); }
@Override public boolean isRecursive(final Path source, final Path target) { try { if(registry.find(session, source, false).equals(registry.find(session, target, false))) { return registry.find(session, source, false).getFeature(session, Move.class, proxy).isRecursive(source, target); } return session.getFeature(Copy.class).isRecursive(source, target); } catch(VaultUnlockCancelException e) { return proxy.isRecursive(source, target); } }
if(r.getKey().isDirectory() && !copy.isRecursive(r.getKey(), r.getValue())) {
protected Map<Path, Path> compile(final Copy copy, final ListService list, final Path source, final Path target) throws BackgroundException { // Compile recursive list final Map<Path, Path> recursive = new LinkedHashMap<>(); if(source.isFile() || source.isSymbolicLink()) { recursive.put(source, target); } else if(source.isDirectory()) { // Add parent before children recursive.put(source, target); if(!copy.isRecursive(source, target)) { // sort ascending by timestamp to copy older versions first final AttributedList<Path> children = list.list(source, new WorkerListProgressListener(this, listener)). filter(new TimestampComparator(true)); for(Path child : children) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } recursive.putAll(this.compile(copy, list, child, new Path(target, child.getName(), child.getType()))); } } } return recursive; }