I know this is a question that may have been asked before (at least in Python), but I am still struggling to get this right. I compare my local folder structure and content with what I have stored in my Amazon S3 bucket. The directories not exisiting on S3, but which are found locally, are to be created in my S3 bucket. It seems that Amazon S3 does not have the concept of a f开发者_JAVA百科older, but rather a folder is identified as an empty file of size 0. My question is, how can I easily create a folder in objective-c by putting an empty file (with name correspoding to the folder name) on S3 (I use ASIHTTP for my get and put events)? I want to create the directory explicitly and not implicitly by copying a new file to a non-exisiting folder. I appreciate your help on this.
It seems that Amazon S3 does not have the concept of a folder, but rather a folder is identified as an empty file of size 0
The /
character is often used as a delimiter, when keys are used as pathnames. To make a folder called bar
in the parent folder foo
, create a key with the name /foo/bar/
.
Amazon now has an AWS SDK for Objective C. The S3PutObjectRequest
class has the method -initWithKey:inBucket:
.
精彩评论