Exists 检查项目记忆是否存在
(ctx context.Context, projectID string)
| 72 | |
| 73 | // Exists 检查项目记忆是否存在 |
| 74 | func (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 追加条目到指定章节 |
| 87 | func (s *FileStore) AppendEntry(ctx context.Context, projectID string, section MemorySection, entry *Entry) error { |
nothing calls this directly
no test coverage detected