You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

io.scm 506B

  1. (module io *
  2. (import scheme (chicken file) (chicken io))
  3. (import config paths)
  4. (define (read-post-file config path)
  5. (let ([absolute-path (absolute-post-path config path)])
  6. (call-with-input-file absolute-path (lambda (port) (read-string #f port)))))
  7. (define (fetch-posts config)
  8. (let* ([posts-path (config-posts-dir config)]
  9. [post-paths (directory posts-path)])
  10. (map
  11. (lambda (path)
  12. (cons path (read-post-file config path)))
  13. post-paths))))