@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 testFind() throws Exception {
        final StoregateIdProvider nodeid = new StoregateIdProvider(session);
        final Path room = new StoregateDirectoryFeature(session, nodeid).mkdir(
                new Path(String.format("/My files/%s", new AlphanumericRandomStringService().random()),
                        EnumSet.of(Path.Type.directory, Path.Type.volume)), new TransferStatus());
        assertTrue(room.attributes().getPermission().isExecutable());
        final Path test = new StoregateTouchFeature(session, nodeid).touch(
                new Path(room, String.format("%s", new AlphanumericRandomStringService().random()), EnumSet.of(Path.Type.file)), new TransferStatus());
        final PathAttributes attr = new StoregateAttributesFinderFeature(session, nodeid).find(test);
        assertEquals(attr, new StoregateAttributesFinderFeature(session, nodeid).find(new Path(test.getParent(), StringUtils.upperCase(test.getName()), test.getType())));
        assertEquals(attr, new StoregateAttributesFinderFeature(session, nodeid).find(new Path(test.getParent(), StringUtils.lowerCase(test.getName()), test.getType())));
        assertNotEquals(0L, attr.getModificationDate());
        assertEquals(Checksum.NONE, attr.getChecksum());
        assertNull(attr.getETag());
        assertNotNull(attr.getFileId());
        assertFalse(attr.getPermission().isExecutable());
        assertTrue(attr.getPermission().isReadable());
        assertTrue(attr.getPermission().isWritable());
        final Path list = new StoregateListService(session, nodeid).list(room, new DisabledListProgressListener())
                .find(new DefaultPathPredicate(test));
        assertEquals(attr, list.attributes());
        new StoregateDeleteFeature(session, nodeid).delete(Collections.singletonList(room), new DisabledPasswordCallback(), new Delete.DisabledCallback());
    }