21 lines
293 B
Go
Raw Normal View History

2021-06-27 13:31:30 -07:00
package persistence
import (
"errors"
2022-03-13 17:09:43 -07:00
"os"
2021-06-27 13:31:30 -07:00
)
2024-09-15 15:34:56 -07:00
var ErrNotInDatabase = errors.New("not in database")
2021-06-27 13:31:30 -07:00
// DUPE 1
func file_exists(path string) bool {
_, err := os.Stat(path)
if err == nil {
return true
} else if errors.Is(err, os.ErrNotExist) {
return false
} else {
panic(err)
}
}