// List the objects and directories in dir into entries.  The
// entries can be returned in any order but should be for a
// complete directory.
//
// dir should be "" to list the root, and should not have
// trailing slashes.
//
// This should return ErrDirNotFound if the directory isn't
// found.
List the objects and directories in dir into entries.  The
entries can be returned in any order but should be for a
complete directory.

dir should be "" to list the root, and should not have
trailing slashes.

This should return ErrDirNotFound if the directory isn't
found.
// List the objects and directories in dir into entries . The // entries can be returned in any order but should be for a // complete directory . // // dir should be " " to list the root and should not have // trailing slashes . // // This should return ErrDirNotFound if the directory isn ' t // found .
func (f *Fs) List(dir string) (entries fs.DirEntries, err error) {
	set := make(map[string]fs.DirEntry)
	found := false
	for _, remote := range f.remotes {
		var remoteEntries, err = remote.List(dir)
		if err == fs.ErrorDirNotFound {
			continue
		}
		if err != nil {
			return nil, errors.Wrapf(err, "List failed on %v", remote)
		}
		found = true
		for _, remoteEntry := range remoteEntries {
			set[remoteEntry.Remote()] = remoteEntry
		}
	}
	if !found {
		return nil, fs.ErrorDirNotFound
	}
	for key := range set {
		entries = append(entries, set[key])
	}
	return entries, nil
}
func ( f * Fs ) List ( dir string ) ( entries fs . DirEntries , err error ) { set := make ( map [ string ] fs . DirEntry ) found := false for _ , remote := range f . remotes { var remoteEntries , err = remote . List ( dir ) if err == fs . ErrorDirNotFound { continue } if err != nil { return nil , errors . Wrapf ( err , " " , remote ) } found = true for _ , remoteEntry := range remoteEntries { set [ remoteEntry . Remote ( ) ] = remoteEntry } } if ! found { return nil , fs . ErrorDirNotFound } for key := range set { entries = append ( entries , set [ key ] ) } return entries , nil }
List the objects and directories in dir into entries.
List the objects and directories in dir into entries .