title: How to list all files in an s3 folder using AWS-SDK gem in ruby on rails
body: <p>I wanted to show a list of all files in an s3 folder so I can get all the last modified dates so I can determine what files has been changed.</p>
  
  <p>I tried using objects.with_prefix('Folder1') it give me a full list but also contain Folder1.1 key</p>
  
  <p>I don't know if i needed to use delimiter but I couldn't find anything how to use delimiter in aws sdk.</p>
  
  <p>Thanks so much in advance!</p>
  
  <p>I'm using 'aws-sdk' gem</p>
  
  <p>Here is my bucket structure
   -Folder1
     -File1
     -File2
     -Folder.1.1</p>
  
  <p>Here is my code </p>
  
  <pre><code>bucket = s3.buckets[bucket_name]
  data = bucket.objects.with_prefix('Folder1/')
  data.each do |object|
      puts "#{object.key}\t#{object.last_modified}";
  end
  </code></pre>