// listDir lists files and directories to out
listDir lists files and directories to out
// listDir lists files and directories to out
func (f *Fs) listDir(ctx context.Context, dir string) (entries fs.DirEntries, err error) {
	err = f.list(ctx, dir, false, func(remote string, object *qs.KeyType, isDirectory bool) error {
		entry, err := f.itemToDirEntry(remote, object, isDirectory)
		if err != nil {
			return err
		}
		if entry != nil {
			entries = append(entries, entry)
		}
		return nil
	})
	if err != nil {
		return nil, err
	}
	f.markBucketOK()
	return entries, nil
}
func ( f * Fs ) listDir ( ctx context . Context , dir string ) ( entries fs . DirEntries , err error ) { err = f . list ( ctx , dir , false , func ( remote string , object * qs . KeyType , isDirectory bool ) error { entry , err := f . itemToDirEntry ( remote , object , isDirectory ) if err != nil { return err } if entry != nil { entries = append ( entries , entry ) } return nil } ) if err != nil { return nil , err } f . markBucketOK ( ) return entries , nil }
listDir lists files and directories to out
listDir lists files and directories to out
// List the objects and directories // bucket must be present if listing succeeded