MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / resetRoot

Method resetRoot

internal/utils/service.go:83–101  ·  view source on GitHub ↗

重置Root

()

Source from the content-addressed store, hash-verified

81
82// 重置Root
83func (this *ServiceManager) resetRoot() {
84 if !Tea.IsTesting() {
85 exePath, err := os.Executable()
86 if err != nil {
87 exePath = os.Args[0]
88 }
89 link, err := filepath.EvalSymlinks(exePath)
90 if err == nil {
91 exePath = link
92 }
93 fullPath, err := filepath.Abs(exePath)
94 if err == nil {
95 Tea.UpdateRoot(filepath.Dir(filepath.Dir(fullPath)))
96 }
97 }
98 Tea.SetPublicDir(Tea.Root + Tea.DS + "web" + Tea.DS + "public")
99 Tea.SetViewsDir(Tea.Root + Tea.DS + "web" + Tea.DS + "views")
100 Tea.SetTmpDir(Tea.Root + Tea.DS + "web" + Tea.DS + "tmp")
101}
102
103// PauseWindow 保持命令行窗口是打开的
104func (this *ServiceManager) PauseWindow() {

Callers 1

NewServiceManagerFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected