> (1) For uploading file to cloud storage, we use options for "blobbuilder"
> (something like format("%s/%s), directory,filename)
> How do we use this for getblob? Am i correct in thinking that blobbuilder
> can be used for only "putblob"?
Personally, I have always consider BlobBuilder as a helper for
*building* (i.e. making) blobs. For retrieving blobs I simply use one
of the BlobStore.getBlob [1, 2] variants.
> (2) Regarding recursive listing/listing of only files or folders- I am
> working on a web crawler that can extract and analyse data from any
> publicly available website- the result can be stored on a cloud storage
> provider as specified by the end user. Hence I would want to be able to use
> same code across as many cloud storage providers, as is possible
First off, you should be able to use the ListContainerOptions [3] in
conjunction with BlobStore.list [4] to find all contents within a
certain directory.
One thing you could do is use a tag or other piece of user metadata to
distinguish "folder" and "non-folder" blobs. Then you could filter the
result output to show only folders or files, and you would only need
to query the metadata to do this.
In fact, from what I recall, the "tag as folder" trick is what jclouds
does internally for some providers to simulate folders. But if you
choose your own tagging scheme you should have something that works
across providers.
Hope this helps!
ap
[1]
http://javadocs.jclouds.cloudbees.net/org/jclouds/blobstore/AsyncBlobStore.html#getBlob(java.lang.String,
java.lang.String)
[2]
http://javadocs.jclouds.cloudbees.net/org/jclouds/blobstore/AsyncBlobStore.html#getBlob(java.lang.String, java.lang.String,
org.jclouds.blobstore.options.GetOptions)
[3]
http://javadocs.jclouds.cloudbees.net/org/jclouds/blobstore/options/ListContainerOptions.html
[4]
http://javadocs.jclouds.cloudbees.net/org/jclouds/blobstore/AsyncBlobStore.html#list(java.lang.String,
org.jclouds.blobstore.options.ListContainerOptions)