MCPcopy Create free account
hub / github.com/google/codesearch / File

Function File

index/read.go:431–442  ·  view source on GitHub ↗

File returns the name of the index file to use. It is either $CSEARCHINDEX or $HOME/.csearchindex.

()

Source from the content-addressed store, hash-verified

429// File returns the name of the index file to use.
430// It is either $CSEARCHINDEX or $HOME/.csearchindex.
431func File() string {
432 f := os.Getenv("CSEARCHINDEX")
433 if f != "" {
434 return f
435 }
436 var home string
437 home = os.Getenv("HOME")
438 if runtime.GOOS == "windows" && home == "" {
439 home = os.Getenv("USERPROFILE")
440 }
441 return filepath.Clean(home + "/.csearchindex")
442}

Callers 3

mainFunction · 0.92
MainFunction · 0.92
corruptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…