@Override
    public PathAttributes find(final Path file, final ListProgressListener listener) throws BackgroundException {
        if(file.isRoot()) {
            return PathAttributes.EMPTY;
        }
        try {
            try {
                final PreferencesReader preferences = new HostPreferences(session.getHost());
                if(preferences.getBoolean("ftp.command.mlsd")) {
                    if(session.getClient().hasFeature(FTPCmd.MLST.getCommand())) {
                        if(!FTPReply.isPositiveCompletion(session.getClient().sendCommand(FTPCmd.MLST, file.getAbsolute()))) {
                            throw new FTPException(session.getClient().getReplyCode(), session.getClient().getReplyString());
                        }
                        final FTPDataResponseReader reader = new FTPMlsdListResponseReader();
                        final AttributedList<Path> attributes
                                = reader.read(file.getParent(), Arrays.asList(session.getClient().getReplyStrings()));
                        if(attributes.contains(file)) {
                            return attributes.get(attributes.indexOf(file)).attributes();
                        }
                    }
                    log.warn("No support for MLST in reply to FEAT");
                }
                return new DefaultAttributesFinderFeature(session).find(file, listener);
            }
            catch(IOException e) {
                throw new FTPExceptionMappingService().map("Failure to read attributes of {0}", e, file);
            }
        }
        catch(InteroperabilityException | AccessDeniedException | NotfoundException f) {
            log.warn(String.format("Failure reading attributes for %s. %s", file, f.getMessage()));
            return new DefaultAttributesFinderFeature(session).find(file, listener);
        }
    }
@Test
    public void testFindRoot() throws Exception {
        final FTPAttributesFinderFeature f = new FTPAttributesFinderFeature(session);
        assertEquals(PathAttributes.EMPTY, f.find(new Path("/", EnumSet.of(Path.Type.directory))));
    }