MCPcopy Index your code
hub / github.com/dagger/dagger / wipeSQLiteFiles

Function wipeSQLiteFiles

dagql/cache.go:1157–1175  ·  view source on GitHub ↗
(dbPath string)

Source from the content-addressed store, hash-verified

1155}
1156
1157func wipeSQLiteFiles(dbPath string) error {
1158 removeIfExists := func(path string) error {
1159 err := os.Remove(path)
1160 if err == nil || errors.Is(err, fs.ErrNotExist) {
1161 return nil
1162 }
1163 return err
1164 }
1165 if err := removeIfExists(dbPath); err != nil {
1166 return err
1167 }
1168 if err := removeIfExists(dbPath + "-wal"); err != nil {
1169 return err
1170 }
1171 if err := removeIfExists(dbPath + "-shm"); err != nil {
1172 return err
1173 }
1174 return nil
1175}
1176
1177type Cache struct {
1178 // callsMu protects in-flight call bookkeeping and arbitrary in-memory call maps.

Callers 2

NewCacheFunction · 0.85

Calls 2

IsMethod · 0.80
RemoveMethod · 0.65

Tested by

no test coverage detected