You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: qingstor.go
    path of file: ./repos/rclone/backend/qingstor
    
    the code of the file until where you have to start completion: //go:build !plan9 && !js
// +build !plan9,!js

// Package qingstor provides an interface to QingStor object storage
// Home
    
func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err error) {
	bucket, directory := f.split(dir)
	if bucket == "" {
		if directory != "" {
			return nil, fs.ErrorListBucketRequired
		}
		return f.listBuckets(ctx)
	}
	return f.listDir(ctx, bucket, directory, f.rootDirectory, f.rootBucket == "")
}