title: how to get file list inside of a folder in Amazon S3 Bucket
body: <p>Ok, I see <a href="https://stackoverflow.com/questions/9329234/amazon-aws-ios-sdk-how-to-list-all-file-names-in-a-folder">this</a> and <a href="https://stackoverflow.com/questions/15022707/how-to-use-aws-ios-sdk-to-delete-a-folder-and-all-its-objects-in-side-bucket">this</a> and <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/ListingKeysHierarchy.html" rel="nofollow noreferrer">documentation</a> telling amazon is flat file system and for to create/get/set folders , one has to use Delimiter='/' and Prefix. </p>
  
  <p>But I didnt get it, I mean I couldnt write the code. So I have a bucket and a folder  with some files,I want list of those files</p>
  
  <p>So I tried <code>bucket/folder</code> , <code>/bucket/folder/</code> ,  <code>bucket/folder/</code> all of this fails. </p>
  
  <p>If I try only <code>bucket</code>, it works fine</p>
  
  <pre><code>S3ListObjectsRequest *getListObjectsRequest= [[S3ListObjectsRequest alloc] initWithName:@"bucket"]; // tried also here bucket/folder , /bucket/folder/ ,  bucket/folder/ 
      S3ListObjectsResponse *getListObjectsResponse = [self.s3 listObjects:getListObjectsRequest];
  
      //test to see inside of the folder
      NSArray *objectsinamazon = [self.s3 listObjectsInBucket:@"bucket"]; //as I said I tried bucket/folder , /bucket/folder/ ,  bucket/folder/ all od this fails.
  
      NSLog(@"array is %@",objectsinamazon);
  
      S3ListObjectsResult *listObjectsResults = getListObjectsResponse.listObjectsResult;
  
  
  
      for (S3ObjectSummary *objectSummary in listObjectsResults.objectSummaries) {
  
          NSLog(@"Bucket Contents %@:",[objectSummary key]);
         //get last modified date of file by using meta data
      S3GetObjectMetadataRequest *getMetadataRequest = [[S3GetObjectMetadataRequest alloc] initWithKey:[objectSummary key] withBucket:@"bucket"];
      S3GetObjectMetadataResponse *getMetadataResponse = [self.s3 getObjectMetadata:getMetadataRequest];
  
  }
  }
  </code></pre>
  
  <p>I am asking exact syntax(code) to send <code>bucket/folder</code> request to amazon s3 </p>