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

Method Exists

pkg/memory/project/file_store.go:74–84  ·  view source on GitHub ↗

Exists 检查项目记忆是否存在

(ctx context.Context, projectID string)

Source from the content-addressed store, hash-verified

72
73// Exists 检查项目记忆是否存在
74func (s *FileStore) Exists(ctx context.Context, projectID string) (bool, error) {
75 filePath := s.getFilePath(projectID)
76 _, err := os.Stat(filePath)
77 if err == nil {
78 return true, nil
79 }
80 if os.IsNotExist(err) {
81 return false, nil
82 }
83 return false, err
84}
85
86// AppendEntry 追加条目到指定章节
87func (s *FileStore) AppendEntry(ctx context.Context, projectID string, section MemorySection, entry *Entry) error {

Callers

nothing calls this directly

Calls 2

getFilePathMethod · 0.95
StatMethod · 0.65

Tested by

no test coverage detected