Hi Logan, the good news is that you mostly need not change your workflow
at all.  Blobstores generally do not support directories; instead they
emulate them using prefixes and delimiters.  Previously jclouds emulated
directory support to accommodate corner-case providers such as Atmos and
the filesystem, while most providers used these prefixes and delimiters
natively.  One of our contributers did a bunch of work to realign
jclouds with the blobstore reality.  What does this mean practically?
Likely very litter -- you can continue to create /blobs/like/this but
need not call createDirectory.  getBlob remains the same but in list()
you should use prefix and delimiter to limit queries to only the blobs
you have interest in.

On Wed, Feb 21, 2018 at 07:02:39PM -0600, Logan Widick wrote:
> After looking at the Javadocs for version 2.0.x, I noticed that
> createDirectory() was deprecated. How should I go about creating some sort
> of hierarchy within a container stored in a given location by a given
> provider?
> A line of example code and its associated comment (reproduced below) from
> the BlobStore start guide (https://jclouds.apache.org/start/blobstore/)
> suggests that one can pass to the BlobStore.blobBuilder() method arbitrary
> paths separated by forward slashes (like "folderName/sushi.jpg" or
> "folderName/anotherFolderName/sushi.gif"). Is this the recommended approach
> for every provider, or just Amazon S3? Is there another approach?
> blob = blobStore.blobBuilder("test") // you can use folders via
> blobBuilder(folderName + "/sushi.jpg")
> Thanks,
> Logan Widick

Andrew Gaul

Reply via email to