title: aws s3 java sdk list objects
body: <p>I have a structure as so:</p>
  
  <pre><code>common/test/v20170522/part-0001.snappy
  common/test/v20170522/part-0002.snappy
  common/test/v20170522/part-0003.snappy
  common/test/v20170522/part-0004.snappy
  common/test/v20170622/part-0001.snappy
  common/test/v20170622/part-0002.snappy
  common/test/v20170622/part-0003.snappy
  common/test/v20170622/part-0004.snappy
  </code></pre>
  
  <p>There are a lot more version folders with a lot more files in them. I basically want a listing of all of the folders in the <code>test/common</code> folder: so <code>v20170522, v20170622, etc</code>.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>ListObjectsRequest listObjectsRequest = new ListObjectsRequest();
  listObjectsRequest.setBucketName("common");
  listObjectsRequest.setPrefix("test/");
  listObjectsRequest.setDelimiter("/");
  </code></pre>
  
  <p>This returns to me just the files that are in the <code>common/test</code> folder and not the folders. When I remove the delimiter, I get all of the subfiles of all the folders. Is there a way of doing this?</p>