MCPcopy Create free account
hub / github.com/astercloud/aster / Load

Method Load

pkg/tools/builtin/plan_file.go:95–104  ·  view source on GitHub ↗

Load 加载计划文件内容

(path string)

Source from the content-addressed store, hash-verified

93
94// Load 加载计划文件内容
95func (m *PlanFileManager) Load(path string) (string, error) {
96 m.mu.RLock()
97 defer m.mu.RUnlock()
98
99 content, err := os.ReadFile(path)
100 if err != nil {
101 return "", fmt.Errorf("failed to read plan file: %w", err)
102 }
103 return string(content), nil
104}
105
106// Exists 检查计划文件是否存在
107func (m *PlanFileManager) Exists(path string) bool {

Callers

nothing calls this directly

Calls 1

ReadFileMethod · 0.45

Tested by

no test coverage detected