MCPcopy Index your code
hub / github.com/perkeep/perkeep / looksLikePath

Function looksLikePath

cmd/pk/sync.go:216–219  ·  view source on GitHub ↗
(v string)

Source from the content-addressed store, hash-verified

214}
215
216func looksLikePath(v string) bool {
217 prefix := func(s string) bool { return strings.HasPrefix(filepath.ToSlash(v), s) }
218 return prefix("./") || prefix("/") || prefix("../") || filepath.VolumeName(v) != ""
219}
220
221type SyncStats struct {
222 BlobsCopied int

Callers 2

storageFromParamMethod · 0.85
TestLooksLikePathFunction · 0.85

Calls 1

HasPrefixMethod · 0.80

Tested by 1

TestLooksLikePathFunction · 0.68