@Override public boolean accept(final Path file) { if(file.attributes().isDuplicate()) { if(log.isDebugEnabled()) { log.debug(String.format("Reject duplicate %s", file)); } return false; } return true; } }
@Override public boolean isRevertable(final Path file) { return file.attributes().isDuplicate(); }
@Override public boolean accept(final Path file) { if(pattern.matcher(file.getName()).matches()) { return false; } if(file.getType().contains(Path.Type.upload)) { return false; } if(file.attributes().isDuplicate()) { return false; } return true; }
@Override public boolean test(final Path test) { if(test.attributes().isDuplicate()) { // Ignore trashed files return false; } return super.test(test); } }
@Override public void visit(final AttributedList<Path> list, final int index, final Path p) { if(p.isFile()) { if(p.attributes().isDuplicate()) { if(p.attributes().getRevision() == 1) { final Map<String, String> custom = new HashMap<>(p.attributes().getCustom()); custom.put(SpectraVersioningFeature.KEY_REVERTABLE, Boolean.TRUE.toString()); p.attributes().setCustom(custom); } } } } });
switch(host.getProtocol().getType()) { case s3: if(!file.attributes().isDuplicate()) { if(!file.getType().contains(Path.Type.upload)) { throw new ConnectionCanceledException(); if(child.attributes().isDuplicate() && child.isFile()) {