MCPcopy Create free account
hub / github.com/go-git/go-git / NewFileIter

Function NewFileIter

plumbing/object/file.go:83–85  ·  view source on GitHub ↗

NewFileIter takes a storer.EncodedObjectStorer and a Tree and returns a *FileIter that iterates over all files contained in the tree, recursively.

(s storer.EncodedObjectStorer, t *Tree)

Source from the content-addressed store, hash-verified

81// NewFileIter takes a storer.EncodedObjectStorer and a Tree and returns a
82// *FileIter that iterates over all files contained in the tree, recursively.
83func NewFileIter(s storer.EncodedObjectStorer, t *Tree) *FileIter {
84 return &FileIter{s: s, w: *NewTreeWalker(t, true, nil)}
85}
86
87// Next moves the iterator to the next file and returns a pointer to it. If
88// there are no more files, it returns io.EOF.

Callers 2

TestIterMethod · 0.85
FilesMethod · 0.85

Calls 1

NewTreeWalkerFunction · 0.85

Tested by 1

TestIterMethod · 0.68