MCPcopy
hub / github.com/wagoodman/dive / RemovePath

Method RemovePath

dive/filetree/file_tree.go:285–291  ·  view source on GitHub ↗

RemovePath removes a node from the tree given its path.

(path string)

Source from the content-addressed store, hash-verified

283
284// RemovePath removes a node from the tree given its path.
285func (tree *FileTree) RemovePath(path string) error {
286 node, err := tree.GetNode(path)
287 if err != nil {
288 return err
289 }
290 return node.Remove()
291}
292
293type compareMark struct {
294 lowerNode *FileNode

Callers 6

TestRemovePathFunction · 0.95
TestCopyFunction · 0.95
TestStackRangeFunction · 0.95
TestRemoveOnIterateFunction · 0.95
StackMethod · 0.95
UpdateMethod · 0.80

Calls 2

GetNodeMethod · 0.95
RemoveMethod · 0.80

Tested by 4

TestRemovePathFunction · 0.76
TestCopyFunction · 0.76
TestStackRangeFunction · 0.76
TestRemoveOnIterateFunction · 0.76