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

Method ensureCollectionDir

pkg/store/json.go:366–369  ·  view source on GitHub ↗

ensureCollectionDir 确保 collection 目录存在

(collection string)

Source from the content-addressed store, hash-verified

364
365// ensureCollectionDir 确保 collection 目录存在
366func (js *JSONStore) ensureCollectionDir(collection string) error {
367 dir := js.collectionDir(collection)
368 return os.MkdirAll(dir, 0755)
369}
370
371// Get 获取单个资源
372func (js *JSONStore) Get(ctx context.Context, collection, key string, dest any) error {

Callers 1

SetMethod · 0.95

Calls 1

collectionDirMethod · 0.95

Tested by

no test coverage detected