MCPcopy
hub / github.com/cayleygraph/cayley / Create

Function Create

graph/kv/bolt/bolt.go:46–57  ·  view source on GitHub ↗
(path string, _ graph.Options)

Source from the content-addressed store, hash-verified

44}
45
46func Create(path string, _ graph.Options) (hkv.KV, error) {
47 err := os.MkdirAll(path, 0700)
48 if err != nil {
49 return nil, err
50 }
51 db, err := bolt.Open(getBoltFile(path), nil)
52 if err != nil {
53 clog.Errorf("Error: couldn't create Bolt database: %v", err)
54 return nil, err
55 }
56 return db, nil
57}
58
59func Open(path string, opt graph.Options) (hkv.KV, error) {
60 db, err := bolt.Open(getBoltFile(path), nil)

Callers 1

makeBoltFunction · 0.70

Calls 2

ErrorfFunction · 0.92
getBoltFileFunction · 0.85

Tested by 1

makeBoltFunction · 0.56