title: Amazon S3 listing "directories"
body: <p>I've created a hierarchy in S3 via the AWS S3 Management Console. If I run the following code to list the bucket:</p>
  
  <pre><code>AmazonS3 s3 = new AmazonS3Client(CRED);
  ListObjectsRequest lor = new ListObjectsRequest()
                               .withBucketName("myBucket")
                               .withPrefix("code/");
  ObjectListing objectListing = s3.listObjects(lor);
  for (S3ObjectSummary summary: objectListing.getObjectSummaries()) {
      System.out.println(summary.getKey());
  }
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>code/ 
  code/03000000-0001-0000-0000-000000000000/ 
  code/03000000-0001-0000-0000-000000000000/special.js 
  code/03000000-0001-0000-0000-000000000000/test.js 
  code/03000000-0002-0000-0000-000000000000/ 
  </code></pre>
  
  <p>Which is exactly what I would expect. If I add a delimiter though, so that I only list the content directly under "code/" I now don't get any sub "directories" back. </p>
  
  <p>Change line above (add withDelimiter() on the end) to:</p>
  
  <pre><code>ListObjectsRequest lor = new ListObjectsRequest().withBucketName("myBucket")
                                                   .withPrefix("code/")
                                                   .withDelimiter("/");
  </code></pre>
  
  <p>And I now only get:</p>
  
  <pre><code>code/ 
  </code></pre>
  
  <p>I know that S3 doesn't have "directories", instead delimited keys, but this behaviour seems odd? How would I list what is only immediately below "code"?</p>