(define-module (vcomponent data-stores file) :use-module (oop goops) :use-module ((srfi srfi-88) :select ()) :use-module ((calp) :select (prodid)) :use-module (vcomponent data-stores common) :use-module ((vcomponent formats ical) :select (serialize deserialize)) ) (define-class () (path getter: path init-keyword: path:)) (define (make-file-store path) (make path: path)) (define-method (get-all (this )) ;; X-WR-CALNAME ⇒ NAME ;; X-WR-CALDESC (call-with-input-file (path this) deserialize)) (define-method (get-by-uid (this ) (uid )) #f ) (define-method (queue-write (this ) vcomponent) ) (define-method (flush (this )) (with-atomic-output-to-file (path this) (lambda () (serialize (data this) (current-output-port)))) )