class GoogleStorageMetadataFeature implements Headers {

    @Override
    public Map<String, String> getMetadata(final Path file) throws BackgroundException {
        if(file.isFile() || file.isPlaceholder()) {
            try {
                return new GoogleStorageAttributesFinderFeature(session).find(file).getMetadata();
            }
            catch(NotfoundException e) {
                if(file.isPlaceholder()) {
                    // No placeholder file may exist but we just have a common prefix
                    return Collections.emptyMap();
                }
                throw e;
            }
        }
        return Collections.emptyMap();
    }

    public  GoogleStorageMetadataFeature(final GoogleStorageSession session);

}