MCPcopy Create free account
hub / github.com/prometheus/common / JoinDir

Function JoinDir

config/config.go:96–101  ·  view source on GitHub ↗

JoinDir joins dir and path if path is relative. If path is empty or absolute, it is returned unchanged.

(dir, path string)

Source from the content-addressed store, hash-verified

94// JoinDir joins dir and path if path is relative.
95// If path is empty or absolute, it is returned unchanged.
96func JoinDir(dir, path string) string {
97 if path == "" || filepath.IsAbs(path) {
98 return path
99 }
100 return filepath.Join(dir, path)
101}

Callers 6

SetDirectoryMethod · 0.85
SetDirectoryMethod · 0.85
SetDirectoryMethod · 0.85
SetDirectoryMethod · 0.85
SetDirectoryMethod · 0.85
SetDirectoryMethod · 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…