MCPcopy Create free account
hub / github.com/cogentcore/core / DiffDirs

Method DiffDirs

texteditor/diffbrowser/node.go:108–114  ·  view source on GitHub ↗

DiffDirs creates a tree of files within the two paths, where the files have the same names, yet differ in content. The excludeFile function, if non-nil, will exclude files or directories from consideration if it returns true.

(pathA, pathB string, excludeFile func(fname string) bool)

Source from the content-addressed store, hash-verified

106// The excludeFile function, if non-nil, will exclude files or
107// directories from consideration if it returns true.
108func (br *Browser) DiffDirs(pathA, pathB string, excludeFile func(fname string) bool) {
109 br.PathA = pathA
110 br.PathB = pathB
111 tv := br.Tree()
112 tv.SetText(fsx.DirAndFile(pathA))
113 br.diffDirsAt(pathA, pathB, tv, excludeFile)
114}
115
116// diffDirsAt creates a tree of files with the same names
117// that differ within two dirs.

Callers

nothing calls this directly

Calls 4

TreeMethod · 0.95
diffDirsAtMethod · 0.95
DirAndFileFunction · 0.92
SetTextMethod · 0.45

Tested by

no test coverage detected