mirror of
https://github.com/minio/mc.git
synced 2025-11-14 23:42:27 +03:00
ListOnChannel() - now listbuckets and objects through channel replies.
Still doesn't do full recursive of all objects based on marker, that is the next step.
This commit is contained in:
@@ -110,6 +110,20 @@ func (f *fsClient) GetObjectMetadata() (item *client.Item, reterr error) {
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (f *fsClient) ListOnChannel() <-chan client.ItemOnChannel {
|
||||
itemCh := make(chan client.ItemOnChannel)
|
||||
go f.listInGoroutine(itemCh)
|
||||
return itemCh
|
||||
}
|
||||
|
||||
func (f *fsClient) listInGoroutine(itemCh chan client.ItemOnChannel) {
|
||||
defer close(itemCh)
|
||||
itemCh <- client.ItemOnChannel{
|
||||
Item: nil,
|
||||
Err: iodine.New(client.APINotImplemented{API: "ListOnChannel"}, nil),
|
||||
}
|
||||
}
|
||||
|
||||
// List - get a list of items
|
||||
func (f *fsClient) List() (items []*client.Item, err error) {
|
||||
visitFS := func(fp string, fi os.FileInfo, err error) error {
|
||||
|
||||
Reference in New Issue
Block a user