All that I found, it\'s this method GET Bucket But I can\'t understand how can I get only a list of folders in the current folder. Which prefix and delimiter I need to use?
Using prefix
of the/path/to/read/
(note that there is no leading slash, but there is a trailing slash), and delimiter
of /
, you'll find all the folders within that folder inside
.
CommonPrefixes
A response can contain
CommonPrefixes
only if you specify a delimiter. When you do,CommonPrefixes
contains all (if there are any) keys between Prefix and the next occurrence of the string specified by delimiter. In effect, CommonPrefixes lists keys that act like subdirectories in the directory specified byPrefix
. For example, if prefix is notes/ and delimiter is a slash (/), in notes/summer/july, the common prefix is notes/summer/. All of the keys rolled up in a common prefix count as a single return when calculating the number of returns. See MaxKeys.http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGET.html