@Override
    public boolean find(Path file, final ListProgressListener listener) throws BackgroundException {
        if(file.isRoot()) {
            return true;
        }
        try {
            try {
                final boolean found;
                if(containerService.isContainer(file)) {
                    final CloudBlobContainer container = session.getClient().getContainerReference(containerService.getContainer(file).getName());
                    return container.exists(null, null, context);
                }
                if(file.isFile() || file.isPlaceholder()) {
                    try {
                        final CloudBlob blob = session.getClient().getContainerReference(containerService.getContainer(file).getName())
                                .getBlobReferenceFromServer(containerService.getKey(file));
                        return blob.exists(null, null, context);
                    }
                    catch(StorageException e) {
                        switch(e.getHttpStatusCode()) {
                            case HttpStatus.SC_NOT_FOUND:
                                if(file.isPlaceholder()) {
                                    // Ignore failure and look for common prefix
                                    break;
                                }
                            default:
                                throw e;
                        }
                    }
                }
                if(log.isDebugEnabled()) {
                    log.debug(String.format("Search for common prefix %s", file));
                }
                // Check for common prefix
                try {
                    new AzureObjectListService(session, context).list(file, new CancellingListProgressListener());
                    return true;
                }
                catch(ListCanceledException l) {
                    // Found common prefix
                    return true;
                }
            }
            catch(StorageException e) {
                throw new AzureExceptionMappingService().map("Failure to read attributes of {0}", e, file);
            }
            catch(URISyntaxException e) {
                return false;
            }
        }
        catch(NotfoundException e) {
            return false;
        }
    }
@Test
    public void testFindFile() throws Exception {
        final Path container = new Path("cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
        final Path file = new Path(container, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
        new AzureTouchFeature(session, null).touch(file, new TransferStatus());
        assertTrue(new AzureFindFeature(session, null).find(file));
        assertFalse(new AzureFindFeature(session, null).find(new Path(file.getAbsolute(), EnumSet.of(Path.Type.directory))));
        new AzureDeleteFeature(session, null).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
    }