@Override
    public PathAttributes find(final Path file, final ListProgressListener listener) throws BackgroundException {
        try {
            final PathContainerService service = new DefaultPathContainerService();
            if(service.isContainer(file)) {
                for(RootFolder r : session.roots()) {
                    if(StringUtils.equalsIgnoreCase(file.getName(), PathNormalizer.name(r.getPath()))
                            || StringUtils.equalsIgnoreCase(file.getName(), PathNormalizer.name(r.getName()))) {
                        return this.toAttributes(r);
                    }
                }
                throw new NotfoundException(file.getAbsolute());
            }
            final FilesApi files = new FilesApi(session.getClient());
            return this.toAttributes(files.filesGet_0(URIEncoder.encode(fileid.getPrefixedPath(file))));
        }
        catch(ApiException e) {
            throw new StoregateExceptionMappingService(fileid).map("Failure to read attributes of {0}", e, file);
        }
    }
@Test
    public void testDefaultPaths() throws Exception {
        final StoregateIdProvider nodeid = new StoregateIdProvider(session);
        for(Path container : new StoregateListService(session, nodeid).list(Home.ROOT, new DisabledListProgressListener())) {
            assertEquals(container.attributes(), new StoregateAttributesFinderFeature(session, nodeid).find(container));
        }
        for(RootFolder root : session.roots()) {
            assertNotEquals(PathAttributes.EMPTY, new StoregateAttributesFinderFeature(session, nodeid).find(new Path(root.getPath(), EnumSet.of(Path.Type.directory))));
        }
    }