MCPcopy Create free account
hub / github.com/maruel/panicparse / isFile

Function isFile

stack/context.go:984–989  ·  view source on GitHub ↗

isFile returns true if the path is a valid file.

(p string)

Source from the content-addressed store, hash-verified

982
983// isFile returns true if the path is a valid file.
984func isFile(p string) bool {
985 // TODO(maruel): Is it faster to open the file or to stat it? Worth a perf
986 // test on Windows.
987 i, err := os.Stat(p)
988 return err == nil && !i.IsDir()
989}
990
991// isRootedIn returns a root if the file split in parts exists under root.
992//

Callers 2

isRootedInFunction · 0.85
findRootsMethod · 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…