// List runs the Walker on the given path and returns the list of visited paths.
548268
func List(ctx context.Context, w Walker, path string) ([]string, error) {
	var out []string
	if err := w.Walk(ctx, path, func(path string) error {
		out = append(out, path)
		return nil
	}); err != nil {
		return nil, err
	}
	return out, nil
}
1092884
func list(path string, listxattrFunc listxattrFunc) ([]string, error) {
	myname := "xattr.list"
	// find size.
	size, err := listxattrFunc(nil)
	if err != nil {
		return nil, &Error{myname, path, "", err}
	}
	if size > 0 {
		// `size + 1` because of ERANGE error when reading
		// from a SMB1 mount point (https://github.com/pkg/xattr/issues/16).
		buf := make([]byte, size+1)
		// Read into buffer of that size.
		read, err := listxattrFunc(buf)
		if err != nil {
			return nil, &Error{myname, path, "", err}
		}
		return stringsFromByteSlice(buf[:read]), nil
	}
	return []string{}, nil
}
666863
func (c *TagsCollection) List() ([]string, error) {
	var strC C.git_strarray

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	ecode := C.git_tag_list(&strC, c.repo.ptr)
	runtime.KeepAlive(c)
	if ecode < 0 {
		return nil, MakeGitError(ecode)
	}
	defer C.git_strarray_free(&strC)

	tags := makeStringsFromCStrings(strC.strings, int(strC.count))
	return tags, nil
}
546734
func (list *TargetList) List() []TargetID {
	list.RLock()
	defer list.RUnlock()

	keys := []TargetID{}
	for k := range list.targets {
		keys = append(keys, k)
	}

	return keys
}
854377
func List(args ...cty.Value) (cty.Value, error) {
	return ListFunc.Call(args)
}
1178357
func list(dirPath string, start, end []byte) ([]string, error) {
	dir, err := os.Open(dirPath)
	if err != nil {
		return nil, err
	}
	defer dir.Close()

	names, err := dir.Readdirnames(0)
	if err != nil {
		return nil, err
	}
	var keys []string
	for _, name := range names {
		n, err := url.PathUnescape(name)
		if err != nil {
			return nil, fmt.Errorf("Failed to unescape %s while listing", name)
		}
		key := unescapeKey([]byte(n))
		if IsKeyInDomain(key, start, end) {
			keys = append(keys, string(key))
		}
	}
	return keys, nil
}
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
}
1230030
func (e *ListTrackersEngine) List() []libkb.Tracker {
	if e.trackers == nil {
		return []libkb.Tracker{}
	}
	return e.trackers.Trackers
}
1162719
func (r *Store) List(ctx context.Context, maxDepth int) ([]string, error) {
	t, err := r.Tree(ctx)
	if err != nil {
		return []string{}, err
	}
	return t.List(maxDepth), nil
}
646628
func (l *List) Walk(walkFunc ListWalkFunc) error {
	for i := 0; i < len(l.chunks); i++ {
		chk := l.chunks[i]
		for j := 0; j < chk.NumRows(); j++ {
			err := walkFunc(chk.GetRow(j))
			if err != nil {
				return errors.Trace(err)
			}
		}
	}
	return 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)
}
853648
func (s *ScansService) List(ctx context.Context, opt *ScansListOpts) (*scan.ScanList, error) {
	scanList := &scan.ScanList{}
	return scanList, s.client.List(ctx, scansUrl, opt, scanList)
}
1282479
func (c *SpaceTrackerQueriesController) List(ctx *app.ListSpaceTrackerQueriesContext) error {
	var trackerQueries []remoteworkitem.TrackerQuery
	err := application.Transactional(c.db, func(appl application.Application) error {
		err := appl.Spaces().CheckExists(ctx, ctx.SpaceID)
		if err != nil {
			return err
		}
		trackerQueries, err = appl.TrackerQueries().List(ctx, ctx.SpaceID)
		return err
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	return ctx.ConditionalEntities(trackerQueries, c.config.GetCacheControlTrackerQueries, func() error {
		res := &app.TrackerQueryList{}
		res.Data = ConvertTrackerQueriesToApp(c.db, ctx.Request, trackerQueries)
		return ctx.OK(res)
	})
}
518694
func (c *TrackerController) List(ctx *app.ListTrackerContext) error {
	var trkrs []remoteworkitem.Tracker
	err := application.Transactional(c.db, func(appl application.Application) error {
		var err error
		trkrs, err = appl.Trackers().List(ctx)
		return err
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	res := &app.TrackerList{}
	res.Data = ConvertTrackers(ctx.Request, trkrs)
	return ctx.OK(res)
}
826785
func (d *FileDepot) List() []*Tag {
	var tags = make([]*Tag, 0)

	filepath.Walk(d.dirPath, func(path string, info os.FileInfo, err error) error {
		if err != nil {
			return nil
		}
		if info.IsDir() {
			return nil
		}
		rel, err := filepath.Rel(d.dirPath, path)
		if err != nil {
			return nil
		}
		if rel != info.Name() {
			return nil
		}
		tags = append(tags, &Tag{info.Name(), info.Mode()})
		return nil
	})

	return tags
}
896579
func (r *GormTrackerQueryRepository) List(ctx context.Context, spaceID uuid.UUID) ([]TrackerQuery, error) {
	defer goa.MeasureSince([]string{"goa", "db", "trackerquery", "query"}, time.Now())
	var objs []TrackerQuery
	err := r.db.Where("space_id = ?", spaceID).Find(&objs).Error
	if err != nil && err != gorm.ErrRecordNotFound {
		return nil, err
	}
	return objs, nil
}
1132755
func (c *FakeRoutes) List(opts v1.ListOptions) (result *route.RouteList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(routesResource, routesKind, c.ns, opts), &route.RouteList{})

	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &route.RouteList{ListMeta: obj.(*route.RouteList).ListMeta}
	for _, item := range obj.(*route.RouteList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}