MCPcopy Create free account
hub / github.com/Facets-cloud/flow / flowDBPath

Function flowDBPath

internal/app/init.go:27–37  ·  view source on GitHub ↗

flowDBPath returns the absolute path to flow.db under the flow root. Returns a clear error if the data directory hasn't been initialized.

()

Source from the content-addressed store, hash-verified

25// flowDBPath returns the absolute path to flow.db under the flow root.
26// Returns a clear error if the data directory hasn't been initialized.
27func flowDBPath() (string, error) {
28 root, err := flowRoot()
29 if err != nil {
30 return "", err
31 }
32 dbPath := filepath.Join(root, "flow.db")
33 if _, err := os.Stat(dbPath); os.IsNotExist(err) {
34 return "", fmt.Errorf("flow is not initialized — run `flow init` to set up %s", root)
35 }
36 return dbPath, nil
37}
38
39// cmdInit creates ~/.flow/ (or $FLOW_ROOT), initializes flow.db, installs
40// the skill. Idempotent — re-running is safe.

Callers 15

cmdDoFunction · 0.85
cmdDoHereFunction · 0.85
openFlowDBFunction · 0.85
loadOwnerArgFunction · 0.85
ownerRetireFunction · 0.85
ownerNextFunction · 0.85
ownerListFunction · 0.85
addOwnerFunction · 0.85
setArchivedAtFunction · 0.85
addPlaybookFunction · 0.85

Calls 1

flowRootFunction · 0.85

Tested by 3

openFlowDBFunction · 0.68