@Test(expected = NotfoundException.class) public void testNotFound() throws Exception { SkipFilter f = new SkipFilter(new DisabledUploadSymlinkResolver(), new NullSession(new Host(new TestProtocol())) { @Override public AttributedList<Path> list(final Path file, final ListProgressListener listener) { return AttributedList.emptyList(); } }); f.withAttributes(new AttributesFinder() { @Override public PathAttributes find(final Path file) { return file.attributes(); } }); assertFalse(f.accept(new Path("a", EnumSet.of(Path.Type.file)), new NullLocal("a") { @Override public boolean exists() { return false; } }, new TransferStatus().exists(true))); }
@Override public boolean accept(final Path file, final Local local, final TransferStatus parent) throws BackgroundException { if(parent.isExists()) { if(local.isFile()) { if(find.withCache(cache).find(file)) { if(log.isInfoEnabled()) { log.info(String.format("Skip file %s", file)); } return false; } } } return super.accept(file, local, parent); }
SkipFilter extends AbstractUploadFilter { @Override public boolean accept(final Path file, final Local local, final TransferStatus parent) throws BackgroundException { if(parent.isExists()) { if(local.isFile()) { if(find.withCache(cache).find(file)) { if(log.isInfoEnabled()) { log.info(String.format("Skip file %s", file)); } return false; } } } return super.accept(file, local, parent); } }
SkipFilter extends AbstractUploadFilter { @Override public boolean accept(final Path file, final Local local, final TransferStatus parent) throws BackgroundException { if(parent.isExists()) { if(local.isFile()) { if(find.withCache(cache).find(file)) { if(log.isInfoEnabled()) { log.info(String.format("Skip file %s", file)); } return false; } } } return super.accept(file, local, parent); } SkipFilter(final SymlinkResolver<Local> symlinkResolver, final Session<?> session);  SkipFilter(final SymlinkResolver<Local> symlinkResolver, final Session<?> session,
                      final UploadFilterOptions options); }
SkipFilter extends AbstractUploadFilter { @Override public boolean accept(final Path file, final Local local, final TransferStatus parent) throws BackgroundException { if(parent.isExists()) { if(local.isFile()) { if(find.withCache(cache).find(file)) { if(log.isInfoEnabled()) { log.info(String.format("Skip file %s", file)); } return false; } } } return super.accept(file, local, parent); } SkipFilter(final SymlinkResolver<Local> symlinkResolver, final Session<?> session);  SkipFilter(final SymlinkResolver<Local> symlinkResolver, final Session<?> session,
                      final UploadFilterOptions options); @Override boolean accept(final Path file, final Local local, final TransferStatus parent); }
SkipFilter extends AbstractUploadFilter { @Override public boolean accept(final Path file, final Local local, final TransferStatus parent) throws BackgroundException { if(parent.isExists()) { if(local.isFile()) { if(find.withCache(cache).find(file)) { if(log.isInfoEnabled()) { log.info(String.format("Skip file %s", file)); } return false; } } } return super.accept(file, local, parent); } SkipFilter(final SymlinkResolver<Local> symlinkResolver, final Session<?> session);  SkipFilter(final SymlinkResolver<Local> symlinkResolver, final Session<?> session,
                      final UploadFilterOptions options); @Override boolean accept(final Path file, final Local local, final TransferStatus parent);  }