// List will provide a list of all elements in storage
List will provide a list of all elements in storage
// List will provide a list of all elements in storage
func (fs *FileStore) List() (names []string) {
	if fs.Names != nil {
		return fs.Names
	}
	files, err := ioutil.ReadDir(fs.Basepath)
	if err != nil {
		log.Fatal(err)
	}
	for _, file := range files {
		fs.Names = append(fs.Names, file.Name())
	}
	return fs.Names
}
func ( fs * FileStore ) List ( ) ( names [ ] string ) { if fs . Names != nil { return fs . Names } files , err := ioutil . ReadDir ( fs . Basepath ) if err != nil { log . Fatal ( err ) } for _ , file := range files { fs . Names = append ( fs . Names , file . Name ( ) ) } return fs . Names }
List will provide a list of all elements in storage
List will provide a list of all elements in storage