> +      System.out.println("Uploading " + dirPath + " to " + container);
> +
> +      storage.createContainerInLocation(null, container);
> +
> +      List<BlobDetail> blobDetails = Lists.newArrayList();
> +      generateFileList(dir, "", blobDetails);
> +      uploadFiles(container, blobDetails);
> +   }
> +
> +   /**
> +    * Recursively generate the list of files to upload.
> +    */
> +   private void generateFileList(File localDir, String remotePath, 
> List<BlobDetail> blobDetails) {
> +      for (File localFile: localDir.listFiles()) {
> +         if (localFile.isFile()) {
> +            String remoteBlobName = remotePath + localFile.getName();

Bit of a nit, but since you end up using this expression in both branches, pull 
it up before the `if`?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/11/files#r5439071

Reply via email to