// listBuckets lists the buckets to out
listBuckets lists the buckets to out
// listBuckets lists the buckets to out
func (f *Fs) listBuckets(dir string) (entries fs.DirEntries, err error) {
	if dir != "" {
		return nil, fs.ErrorListBucketRequired
	}
	req := qs.ListBucketsInput{
		Location: &f.zone,
	}
	resp, err := f.svc.ListBuckets(&req)
	if err != nil {
		return nil, err
	}
	for _, bucket := range resp.Buckets {
		d := fs.NewDir(qs.StringValue(bucket.Name), qs.TimeValue(bucket.Created))
		entries = append(entries, d)
	}
	return entries, nil
}
func ( f * Fs ) listBuckets ( dir string ) ( entries fs . DirEntries , err error ) { if dir != " " { return nil , fs . ErrorListBucketRequired } req := qs . ListBucketsInput { Location : & f . zone , } resp , err := f . svc . ListBuckets ( & req ) if err != nil { return nil , err } for _ , bucket := range resp . Buckets { d := fs . NewDir ( qs . StringValue ( bucket . Name ) , qs . TimeValue ( bucket . Created ) ) entries = append ( entries , d ) } return entries , nil }
listBuckets lists the buckets to out
listBuckets lists the buckets to out