@Test public void testAccept() throws Exception { SkipFilter f = new SkipFilter(new DisabledDownloadSymlinkResolver(), new NullSession(new Host(new TestProtocol()))); assertTrue(f.accept(new Path("a", EnumSet.of(Path.Type.file)) { }, new NullLocal("a", "b") { @Override public boolean exists() { return false; } }, new TransferStatus().exists(true) ) ); assertFalse(f.accept(new Path("a", EnumSet.of(Path.Type.file)) { }, new NullLocal("a", "b") { @Override public boolean exists() { return true; } }, new TransferStatus().exists(true) ) ); }
@Override public boolean accept(final Path file, final Local local, final TransferStatus parent) throws BackgroundException { if(local.isFile()) { if(local.exists()) { if(log.isInfoEnabled()) { log.info(String.format("Skip file %s", file)); } return false; } } return super.accept(file, local, parent); }
SkipFilter extends AbstractDownloadFilter { @Override public boolean accept(final Path file, final Local local, final TransferStatus parent) throws BackgroundException { if(local.isFile()) { if(local.exists()) { if(log.isInfoEnabled()) { log.info(String.format("Skip file %s", file)); } return false; } } return super.accept(file, local, parent); } }
SkipFilter extends AbstractDownloadFilter { @Override public boolean accept(final Path file, final Local local, final TransferStatus parent) throws BackgroundException { if(local.isFile()) { if(local.exists()) { if(log.isInfoEnabled()) { log.info(String.format("Skip file %s", file)); } return false; } } return super.accept(file, local, parent); } SkipFilter(final SymlinkResolver<Path> symlinkResolver, final Session<?> session);  SkipFilter(final SymlinkResolver<Path> symlinkResolver, final Session<?> session,
                      final DownloadFilterOptions options); }
SkipFilter extends AbstractDownloadFilter { @Override public boolean accept(final Path file, final Local local, final TransferStatus parent) throws BackgroundException { if(local.isFile()) { if(local.exists()) { if(log.isInfoEnabled()) { log.info(String.format("Skip file %s", file)); } return false; } } return super.accept(file, local, parent); } SkipFilter(final SymlinkResolver<Path> symlinkResolver, final Session<?> session);  SkipFilter(final SymlinkResolver<Path> symlinkResolver, final Session<?> session,
                      final DownloadFilterOptions options); @Override boolean accept(final Path file, final Local local, final TransferStatus parent); }
SkipFilter extends AbstractDownloadFilter { @Override public boolean accept(final Path file, final Local local, final TransferStatus parent) throws BackgroundException { if(local.isFile()) { if(local.exists()) { if(log.isInfoEnabled()) { log.info(String.format("Skip file %s", file)); } return false; } } return super.accept(file, local, parent); } SkipFilter(final SymlinkResolver<Path> symlinkResolver, final Session<?> session);  SkipFilter(final SymlinkResolver<Path> symlinkResolver, final Session<?> session,
                      final DownloadFilterOptions options); @Override boolean accept(final Path file, final Local local, final TransferStatus parent);  }