mirror of
https://github.com/pgsty/minio.git
synced 2026-08-08 23:33:30 +03: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:
@@ -21,8 +21,8 @@ func NewStorage(rootDir string) (storage.ObjectStorage, error) {
|
||||
return &newStorage, nil
|
||||
}
|
||||
|
||||
func (fsStorage *fileSystemStorage) List(listPath string) ([]storage.ObjectDescription, error) {
|
||||
fileInfos, err := ioutil.ReadDir(path.Join(fsStorage.RootDir, listPath))
|
||||
func (fsStorage *fileSystemStorage) List() ([]storage.ObjectDescription, error) {
|
||||
fileInfos, err := ioutil.ReadDir(fsStorage.RootDir)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -31,9 +31,9 @@ func (fsStorage *fileSystemStorage) List(listPath string) ([]storage.ObjectDescr
|
||||
|
||||
for _, fi := range fileInfos {
|
||||
description := storage.ObjectDescription{
|
||||
Path: fi.Name(),
|
||||
IsDir: fi.IsDir(),
|
||||
Hash: "", // TODO
|
||||
Name: fi.Name(),
|
||||
Md5sum: "",
|
||||
Protectionlevel: "",
|
||||
}
|
||||
descriptions = append(descriptions, description)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user