MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / GetAppResourcePath

Method GetAppResourcePath

agent/app/model/app.go:51–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49}
50
51func (i *App) GetAppResourcePath() string {
52 if i.IsLocalApp() {
53 return filepath.Join(global.Dir.LocalAppResourceDir, strings.TrimPrefix(i.Key, "local"))
54 }
55 if i.IsCustomApp() {
56 return filepath.Join(global.Dir.CustomAppResourceDir, i.Key)
57 }
58 return filepath.Join(global.Dir.RemoteAppResourceDir, i.Key)
59}
60
61func getLang(c *gin.Context) string {
62 lang := c.GetHeader("Accept-Language")

Callers 3

downloadAppFunction · 0.80
GetAppDetailMethod · 0.80
CreateMethod · 0.80

Calls 2

IsLocalAppMethod · 0.95
IsCustomAppMethod · 0.95

Tested by

no test coverage detected