MCPcopy
hub / github.com/go-git/go-git / ReadDir

Method ReadDir

worktree_fs.go:94–99  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

92}
93
94func (sfs *worktreeFilesystem) ReadDir(path string) ([]os.FileInfo, error) {
95 if err := sfs.validReadPath(path); err != nil {
96 return nil, fmt.Errorf("readdir: %w", err)
97 }
98 return sfs.Filesystem.ReadDir(path)
99}
100
101func (sfs *worktreeFilesystem) Lstat(filename string) (os.FileInfo, error) {
102 if err := sfs.validReadPath(filename); err != nil {

Callers 15

TestCloneSparseMethod · 0.45
TestCloneDeepMethod · 0.45
checkIfCleanupIsNeededFunction · 0.45
cleanUpDirFunction · 0.45
CleanMethod · 0.45
doCleanMethod · 0.45
removeDirIfEmptyFunction · 0.45
TestPullCheckoutMethod · 0.45
TestCheckoutMethod · 0.45

Calls 1

validReadPathMethod · 0.95

Tested by 11

TestCloneSparseMethod · 0.36
TestCloneDeepMethod · 0.36
TestPullCheckoutMethod · 0.36
TestCheckoutMethod · 0.36
TestCheckoutForceMethod · 0.36
TestCheckoutSparseMethod · 0.36
TestResetSparselyMethod · 0.36