// List returns a slice of all items. There is also StringSlice() and
// IntSlice() methods for returning slices of type string or int.
340453
func (s *Set) List() []interface{} {
	s.l.RLock()
	defer s.l.RUnlock()

	list := make([]interface{}, 0, len(s.m))

	for item := range s.m {
		list = append(list, item)
	}

	return list
}
232718
func (f *FileStore) List() ([]string, error) {
	keys := make([]string, 0)
	files, err := f.filesystem.ReadDir(f.directoryPath)
	if err != nil {
		return keys, err
	}
	for _, f := range files {
		if !strings.HasPrefix(f.Name(), tmpPrefix) {
			keys = append(keys, f.Name())
		}
	}
	return keys, nil
}
928343
func (r *Reply) List() ([]string, error) {
	// Doing all this in two places instead of just calling ListBytes() so we don't have
	// to iterate twice
	if r.Type == ErrorReply {
		return nil, r.Err
	}
	if r.Type != MultiReply {
		return nil, errors.New("reply type is not MultiReply")
	}

	strings := make([]string, len(r.Elems))
	for i, v := range r.Elems {
		if v.Type == BulkReply {
			strings[i] = string(v.buf)
		} else if v.Type == NilReply {
			strings[i] = ""
		} else {
			return nil, errors.New("element type is not BulkReply or NilReply")
		}
	}

	return strings, nil
}
735159
func (c *FakeKeysets) List(opts v1.ListOptions) (result *v1alpha2.KeysetList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(keysetsResource, keysetsKind, c.ns, opts), &v1alpha2.KeysetList{})

	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &v1alpha2.KeysetList{ListMeta: obj.(*v1alpha2.KeysetList).ListMeta}
	for _, item := range obj.(*v1alpha2.KeysetList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
861039
func List() []string {
	keys := []string{}
	for k := range griftList {
		keys = append(keys, k)
	}
	sort.Strings(keys)
	return keys
}
516203
func (b *Box) List() []string {
	var keys []string

	b.Walk(func(path string, info File) error {
		if info == nil {
			return nil
		}
		finfo, _ := info.FileInfo()
		if !finfo.IsDir() {
			keys = append(keys, path)
		}
		return nil
	})
	sort.Strings(keys)
	return keys
}
204746
func (s Int32) List() []int32 {
	res := make(sortableSliceOfInt32, 0, len(s))
	for key := range s {
		res = append(res, key)
	}
	sort.Sort(res)
	return []int32(res)
}
50190
func (c *FakeImages) List(opts v1.ListOptions) (result *image.ImageList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootListAction(imagesResource, imagesKind, opts), &image.ImageList{})
	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &image.ImageList{ListMeta: obj.(*image.ImageList).ListMeta}
	for _, item := range obj.(*image.ImageList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
1278267
func (j JsonHelper) List(n string) []interface{} {
	v := j.Get(n)
	switch val := v.(type) {
	case []string:
		il := make([]interface{}, len(val))
		for i, val := range val {
			il[i] = val
		}
		return il
	case []interface{}:
		return val
	}
	return nil
}
1018724
func (rl *List) All() ([]string, error) {
	conn := rl.pool.Get(rl.dbindex)
	result, err := redis.Values(conn.Do("LRANGE", rl.id, "0", "-1"))
	strs := make([]string, len(result))
	for i := 0; i < len(result); i++ {
		strs[i] = getString(result, i)
	}
	return strs, err
}
725424
func (s fooNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Foo, err error) {
	err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
		ret = append(ret, m.(*v1alpha1.Foo))
	})
	return ret, err
}
436871
func (f *DeltaFIFO) List() []interface{} {
	f.lock.RLock()
	defer f.lock.RUnlock()
	list := make([]interface{}, 0, len(f.items))
	for _, item := range f.items {
		// Copy item's slice so operations on this slice (delta
		// compression) won't interfere with the object we return.
		item = copyDeltas(item)
		list = append(list, item.Newest().Object)
	}
	return list
}
1314710
func (c *Client) List(args ...string) ([]string, error) {
	id, err := c.cmd("list " + quoteArgs(args))
	if err != nil {
		return nil, err
	}
	c.text.StartResponse(id)
	defer c.text.EndResponse(id)

	var ret []string
	for {
		line, err := c.text.ReadLine()
		if err != nil {
			return nil, err
		}

		i := strings.Index(line, ": ")
		if i > 0 {
			ret = append(ret, line[i+2:])
		} else if line == "OK" {
			break
		} else {
			return nil, textproto.ProtocolError("can't parse line: " + line)
		}
	}
	return ret, nil
}
1078494
func List(path string) ([]string, error) {
	dest := make([]byte, 1024)
	i, err := syscall.Listxattr(path, dest)
	if err != nil {
		return nil, err
	}

	// If the returned list is empty, return nil instead of []string{""}
	str := string(dest[:i])
	if str == "" {
		return nil, nil
	}

	return strings.Split(strings.TrimRight(str, nilByte), nilByte), nil
}
1157208
func List() ([]string, error) {
	godelw, err := newGodelwRunner()
	if err != nil {
		return nil, err
	}
	products, err := godelw.run("products")
	if err != nil {
		return nil, err
	}
	return strings.Split(products, "\n"), nil
}
247536
func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) {
	if !lw.DisableChunking {
		return pager.New(pager.SimplePageFunc(lw.ListFunc)).List(context.TODO(), options)
	}
	return lw.ListFunc(options)
}
700604
func (f FakeNamespaceLister) List(opts v1.ListOptions) (*v1.NamespaceList, error) {
	return f.NsList, f.Err
}