@@ -25,29 +25,48 @@ (declare (uses debugprint)) (module dbmod * -(import scheme - chicken - data-structures - extras - files +(import scheme) + +(cond-expand + (chicken-4 + (import chicken + data-structures + extras + files + + posix + + )) + (chicken-5 + (import chicken.base + chicken.condition + chicken.file + chicken.pathname + chicken.process + chicken.sort + chicken.string + chicken.time + + ) + (define file-read-access? file-readable?) + (define file-copy copy-file) + )) - format +(import format (prefix sqlite3 sqlite3:) matchable - posix typed-records srfi-1 srfi-18 srfi-69 commonmod dbfile - debugprint - ) + debugprint) ;; NOTE: This returns only the name "1.db", "main.db", not the path ;; (define (dbmod:run-id->dbfname run-id) (conc (dbfile:run-id->dbnum run-id)".db"))