jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs] JCLOUDS-826: Add blob operations (#176)
Date Thu, 11 Jun 2015 08:12:12 GMT
> +      List<BlobEntity> blobs = findBlobsByContainer(containerName);
> +      for (BlobEntity blob : blobs) {
> +         deleteBlob(containerName, blob.getKey());
> +      }
> +   }
> +
> +   @Transactional
> +   public void deleteBlobsByDirectory(String containerName, String directoryName, boolean
recursive) {
> +      List<BlobEntity> blobs = findBlobsByDirectory(containerName, directoryName,
false);
> +      for (BlobEntity blob : blobs) {
> +         if (!blob.isDirectory()) {
> +            deleteBlob(containerName, blob.getKey());
> +         }
> +         else {
> +            if (recursive) {
> +               deleteBlob(containerName, blob.getKey());

Shouldn't this be deleted *after* all the blobs in the directory are deleted, after the recursive
call?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/176/files#r32198162
Mime
View raw message