mirror of
https://github.com/minio/minio.git
synced 2025-11-28 21:18:10 -05:00
Implement proper delimiter and prefix handling
With this change Minio server now responds with, delimited
'object names' in conjunction with prefix filtering
~~~
<ListBucketResult>
<Name>example-bucket</Name>
<Prefix></Prefix>
<Marker></Marker>
<MaxKeys>1000</MaxKeys>
<Delimiter>/</Delimiter>
<IsTruncated>false</IsTruncated>
<Contents>
<Key>sample.html</Key>
<LastModified>2011-02-26T01:56:20.000Z</LastModified>
<ETag>example-bucket#sample.html</ETag>
<Size>142863</Size>
<Owner>
<ID>minio</ID>
<DisplayName>minio</DisplayName>
</Owner>
<StorageClass>STANDARD</StorageClass>
</Contents>
<CommonPrefixes>
<Prefix>photos/</Prefix>
</CommonPrefixes>
</ListBucketResult>
~~~
~~~
<ListBucketResult>
<Name>example-bucket</Name>
<Prefix>photos/2006/</Prefix>
<Marker></Marker>
<MaxKeys>1000</MaxKeys>
<Delimiter>/</Delimiter>
<IsTruncated>false</IsTruncated>
<CommonPrefixes>
<Prefix>photos/2006/feb/</Prefix>
</CommonPrefixes>
<CommonPrefixes>
<Prefix>photos/2006/jan/</Prefix>
</CommonPrefixes>
</ListBucketResult>
~~~
This commit is contained in:
@@ -43,12 +43,8 @@ type BucketMetadata struct {
|
||||
}
|
||||
|
||||
type ObjectMetadata struct {
|
||||
Bucket string
|
||||
Key string
|
||||
Maxkeys int
|
||||
Prefix string
|
||||
Marker string
|
||||
Delimiter string
|
||||
Bucket string
|
||||
Key string
|
||||
|
||||
ContentType string
|
||||
Created time.Time
|
||||
|
||||
Reference in New Issue
Block a user