package manifest import ( "os" "gitea.k3s.k0.nu/tools/photocli/internal/manifest/types" ) func Open(dir string, format Format) (Manifest, error) { return Default.Open(dir, format) } func ConvertFromJSONL(dir string) (Manifest, error) { return types.ConvertManifest(dir, JSONLAdapter, SQLiteAdapter) } func ConvertFromSQLite(dir string) (Manifest, error) { return types.ConvertManifest(dir, SQLiteAdapter, JSONLAdapter) } func FileExists(path string) bool { info, err := os.Stat(path) if err != nil { return false } return !info.IsDir() } func ParseFormat(s string) (Format, error) { return Default.ParseFormat(s) } func OpenLogWriter(m Manifest, dir string) (LogWriter, error) { format := FormatJSONL if reporter, ok := m.(types.FormatReporter); ok { format = reporter.ManifestFormat() } return Default.OpenLogWriter(m, dir, format) } func osRemove(path string) error { return os.Remove(path) } func init() { types.SetRemoveFunc(osRemove) }