MCPcopy Index your code
hub / github.com/coder/coder / Remove

Method Remove

agent/filefinder/delta.go:78–87  ·  view source on GitHub ↗

Remove marks the entry for path as deleted.

(path string)

Source from the content-addressed store, hash-verified

76
77// Remove marks the entry for path as deleted.
78func (idx *Index) Remove(path string) bool {
79 norm := string(normalizePathBytes([]byte(path)))
80 id, ok := idx.byPath[norm]
81 if !ok {
82 return false
83 }
84 idx.deleted[id] = true
85 delete(idx.byPath, norm)
86 return true
87}
88
89// Has reports whether path exists (not deleted) in the index.
90func (idx *Index) Has(path string) bool {

Callers 3

TestIndex_RemoveFunction · 0.95

Calls 1

normalizePathBytesFunction · 0.85

Tested by 3

TestIndex_RemoveFunction · 0.76