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

Function JoinDir

config/config.go:85–90  ·  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

83// JoinDir joins dir and path if path is relative.
84// If path is empty or absolute, it is returned unchanged.
85func JoinDir(dir, path string) string {
86 if path == "" || filepath.IsAbs(path) {
87 return path
88 }
89 return filepath.Join(dir, path)
90}

Callers 5

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