MCPcopy
hub / github.com/gotify/server / GetProjectDir

Function GetProjectDir

test/filepath.go:11–15  ·  view source on GitHub ↗

GetProjectDir returns the correct absolute path of this project.

()

Source from the content-addressed store, hash-verified

9
10// GetProjectDir returns the correct absolute path of this project.
11func GetProjectDir() string {
12 _, f, _, _ := runtime.Caller(0)
13 projectDir, _ := filepath.Abs(path.Join(filepath.Dir(f), "../"))
14 return projectDir
15}
16
17// WithWd executes a function with the specified working directory.
18func WithWd(chDir string, f func(origWd string)) {

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…