MCPcopy Create free account
hub / github.com/coder/coder / Has

Method Has

agent/filefinder/delta.go:90–93  ·  view source on GitHub ↗

Has reports whether path exists (not deleted) in the index.

(path string)

Source from the content-addressed store, hash-verified

88
89// Has reports whether path exists (not deleted) in the index.
90func (idx *Index) Has(path string) bool {
91 _, ok := idx.byPath[string(normalizePathBytes([]byte(path)))]
92 return ok
93}
94
95// Len returns the number of live (non-deleted) documents.
96func (idx *Index) Len() int { return len(idx.byPath) }

Callers 9

TestIndex_HasFunction · 0.95
TestIndex_RemoveFunction · 0.95
IsDRPCUnimplementedErrorFunction · 0.45
applyEventsMethod · 0.45
handleEventMethod · 0.45
watcherLoopMethod · 0.45
TestFSNotifyWatcherFunction · 0.45

Calls 1

normalizePathBytesFunction · 0.85

Tested by 4

TestIndex_HasFunction · 0.76
TestIndex_RemoveFunction · 0.76
TestFSNotifyWatcherFunction · 0.36