@Test public void testNotSupported() { DownloadSymlinkResolver resolver = new DownloadSymlinkResolver(null, Collections.<TransferItem>singletonList( new TransferItem(new Path("/", EnumSet.of(Path.Type.directory)), new Local(System.getProperty("java.io.tmpdir"))) )); Path p = new Path("/a", EnumSet.of(Path.Type.file, AbstractPath.Type.symboliclink)); assertFalse(resolver.resolve(p)); }
@Override public boolean resolve(final Path file) { if(PreferencesFactory.get().getBoolean("path.symboliclink.resolve")) { return false; } if(feature != null) { final Path target = file.getSymlinkTarget(); for(TransferItem root : files) { if(this.findTarget(target, root.remote)) { if(log.isDebugEnabled()) { log.debug(String.format("Resolved target %s for %s", target, file)); } return true; } } } return false; }
DownloadSymlinkResolver extends AbstractSymlinkResolver<Path> { @Override public boolean resolve(final Path file) { if(PreferencesFactory.get().getBoolean("path.symboliclink.resolve")) { return false; } if(feature != null) { final Path target = file.getSymlinkTarget(); for(TransferItem root : files) { if(this.findTarget(target, root.remote)) { if(log.isDebugEnabled()) { log.debug(String.format("Resolved target %s for %s", target, file)); } return true; } } } return false; } }
DownloadSymlinkResolver extends AbstractSymlinkResolver<Path> { @Override public boolean resolve(final Path file) { if(PreferencesFactory.get().getBoolean("path.symboliclink.resolve")) { return false; } if(feature != null) { final Path target = file.getSymlinkTarget(); for(TransferItem root : files) { if(this.findTarget(target, root.remote)) { if(log.isDebugEnabled()) { log.debug(String.format("Resolved target %s for %s", target, file)); } return true; } } } return false; } DownloadSymlinkResolver(final List<TransferItem> files);  DownloadSymlinkResolver(final Symlink feature, final List<TransferItem> files); }
DownloadSymlinkResolver extends AbstractSymlinkResolver<Path> { @Override public boolean resolve(final Path file) { if(PreferencesFactory.get().getBoolean("path.symboliclink.resolve")) { return false; } if(feature != null) { final Path target = file.getSymlinkTarget(); for(TransferItem root : files) { if(this.findTarget(target, root.remote)) { if(log.isDebugEnabled()) { log.debug(String.format("Resolved target %s for %s", target, file)); } return true; } } } return false; } DownloadSymlinkResolver(final List<TransferItem> files);  DownloadSymlinkResolver(final Symlink feature, final List<TransferItem> files); @Override boolean resolve(final Path file); }
DownloadSymlinkResolver extends AbstractSymlinkResolver<Path> { @Override public boolean resolve(final Path file) { if(PreferencesFactory.get().getBoolean("path.symboliclink.resolve")) { return false; } if(feature != null) { final Path target = file.getSymlinkTarget(); for(TransferItem root : files) { if(this.findTarget(target, root.remote)) { if(log.isDebugEnabled()) { log.debug(String.format("Resolved target %s for %s", target, file)); } return true; } } } return false; } DownloadSymlinkResolver(final List<TransferItem> files);  DownloadSymlinkResolver(final Symlink feature, final List<TransferItem> files); @Override boolean resolve(final Path file);  }