mirror of
https://github.com/minio/minio.git
synced 2025-12-09 00:56:38 -05:00
Add list() object support for erasure and append storage drivers
- Reply back objects with their protectionlevel and md5sum - // TODO hash value - Calculate md5sum after "storeBlocks()", to make sure data is committed
This commit is contained in:
@@ -117,6 +117,17 @@ func (aStorage *appendStorage) Put(objectPath string, object io.Reader) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (aStorage *appendStorage) List(listPath string) ([]storage.ObjectDescription, error) {
|
||||
return nil, errors.New("Not Implemented")
|
||||
func (aStorage *appendStorage) List() ([]storage.ObjectDescription, error) {
|
||||
var objectDescList []storage.ObjectDescription
|
||||
for objectName, _ := range aStorage.objects {
|
||||
var objectDescription storage.ObjectDescription
|
||||
objectDescription.Name = objectName
|
||||
objectDescription.Md5sum = ""
|
||||
objectDescription.Protectionlevel = ""
|
||||
objectDescList = append(objectDescList, objectDescription)
|
||||
}
|
||||
if len(objectDescList) == 0 {
|
||||
return nil, errors.New("No objects found")
|
||||
}
|
||||
return objectDescList, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user