@Override
    public boolean resolve(final Local file) throws NotfoundException, LocalAccessDeniedException {
        if(PreferencesFactory.get().getBoolean("local.symboliclink.resolve")) {
            // Follow links instead
            return false;
        }
        // Create symbolic link only if supported by the host
        if(feature != null) {
            final Local target = file.getSymlinkTarget();
            // Only create symbolic link if target is included in the upload
            for(TransferItem root : files) {
                if(this.findTarget(target, root.local)) {
                    if(log.isDebugEnabled()) {
                        log.debug(String.format("Resolved target %s for %s", target, file));
                    }
                    return true;
                }
            }
        }
        return false; //Follow links instead
    }
@Test
    public void testResolve() throws Exception {
        final ArrayList<TransferItem> files = new ArrayList<>();
        final Path a = new Path("/a", EnumSet.of(Path.Type.directory));
        files.add(new TransferItem(a, new NullLocal(System.getProperty("java.io.tmpdir"), "a") {
            @Override
            public boolean isFile() {
                return false;
            }

            @Override
            public boolean isDirectory() {
                return true;
            }
        }));
        UploadSymlinkResolver resolver = new UploadSymlinkResolver(new Symlink() {
            @Override
            public void symlink(final Path file, final String target) {
                //
            }
        }, files);
        assertTrue(resolver.resolve(new NullLocal(System.getProperty("java.io.tmpdir"), "a" + File.separator + "b") {
            @Override
            public boolean isSymbolicLink() {
                return true;
            }

            @Override
            public boolean isFile() {
                return true;
            }

            @Override
            public Local getSymlinkTarget() {
                return new NullLocal(System.getProperty("java.io.tmpdir"),  "a" + File.separator + "c");
            }
        }));
        assertFalse(resolver.resolve(new NullLocal("/a/b") {
            public boolean isSymbolicLink() {
                return true;
            }

            @Override
            public boolean isFile() {
                return true;
            }

            @Override
            public Local getSymlinkTarget() {
                return new NullLocal("/b/c");
            }
        }));
    }