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

Method ReadFile

pkg/tools/builtin/testutils.go:79–85  ·  view source on GitHub ↗

ReadFile 读取文件内容

(path string)

Source from the content-addressed store, hash-verified

77
78// ReadFile 读取文件内容
79func (th *TestHelper) ReadFile(path string) string {
80 content, err := os.ReadFile(path)
81 if err != nil {
82 th.T.Fatalf("Failed to read file: %v", err)
83 }
84 return string(content)
85}
86
87// FileExists 检查文件是否存在
88func (th *TestHelper) FileExists(path string) bool {

Callers 14

TestEditTool_SimpleEditFunction · 0.95
getFromFileMethod · 0.45
cleanupFilesMethod · 0.45
GetSubagentOutputMethod · 0.45
updateSubagentOutputMethod · 0.45
loadSubagentsMethod · 0.45
LoadDataMethod · 0.45
LoadMethod · 0.45
updateMetadataMethod · 0.45
GetTaskOutputMethod · 0.45
loadTasksMethod · 0.45

Calls

no outgoing calls

Tested by 2

TestEditTool_SimpleEditFunction · 0.76