I am trying to set a quota based on directory, say about 5 mb. And Hence I need to read the size of present blobs in a directory.
I am able to get the size of individual BLOB using the below code,
if(containerName!=null && objectName!=null){
BlobMetadata metaData = blobStore.blobMetadata(containerName, objectName);
if(metaData !=null){
userMetaData = metaData.getUserMetadata();
}
ContentMetadata contMetadata = metaData.getContentMetadata();
System.out.println("Object Size "+ contMetadata.getContentLength());
}
Just not able to find out if I can check the size of all the blobs in a directory with out looping through all the blob metadata.