MCPcopy
hub / github.com/grafana/tempo / Exists

Function Exists

pkg/util/shutdownmarker/shutdown_marker.go:46–57  ·  view source on GitHub ↗

Exists returns true if the shutdown marker file exists on the given path, false otherwise

(p string)

Source from the content-addressed store, hash-verified

44
45// Exists returns true if the shutdown marker file exists on the given path, false otherwise
46func Exists(p string) (bool, error) {
47 s, err := os.Stat(p)
48 if err != nil && os.IsNotExist(err) {
49 return false, nil
50 }
51
52 if err != nil {
53 return false, err
54 }
55
56 return s.Mode().IsRegular(), nil
57}
58
59// GetPath returns the absolute path of the shutdown marker file
60func GetPath(dirPath string) string {

Callers 2

startingMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected