MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / DefaultConfigDirectory

Function DefaultConfigDirectory

config/configuration.go:47–59  ·  view source on GitHub ↗

DefaultConfigDirectory returns the default directory of the config file

()

Source from the content-addressed store, hash-verified

45
46// DefaultConfigDirectory returns the default directory of the config file
47func DefaultConfigDirectory() string {
48 if runtime.GOOS == "windows" {
49 path := os.Getenv("CFDPATH")
50 if path == "" {
51 path = filepath.Join(os.Getenv("ProgramFiles(x86)"), "cloudflared")
52 if _, err := os.Stat(path); os.IsNotExist(err) { // doesn't exist, so return an empty failure string
53 return ""
54 }
55 }
56 return path
57 }
58 return DefaultUnixConfigLocation
59}
60
61// DefaultLogDirectory returns the default directory for log files
62func DefaultLogDirectory() string {

Callers 2

DefaultLogDirectoryFunction · 0.85
DefaultConfigPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected