MCPcopy
hub / github.com/gotify/server / createDirectoryIfSqlite

Function createDirectoryIfSqlite

database/database.go:133–141  ·  view source on GitHub ↗
(dialect, connection string)

Source from the content-addressed store, hash-verified

131}
132
133func createDirectoryIfSqlite(dialect, connection string) {
134 if dialect == "sqlite3" {
135 if _, err := os.Stat(filepath.Dir(connection)); os.IsNotExist(err) {
136 if err := mkdirAll(filepath.Dir(connection), 0o777); err != nil {
137 panic(err)
138 }
139 }
140 }
141}
142
143// GormDatabase is a wrapper for the gorm framework.
144type GormDatabase struct {

Callers 1

NewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…