file-reader.scm 235 B

12345678910111213
  1. (define-module (file-reader)
  2. #:export (read-file-to-bytevector))
  3. (use-modules
  4. ;; for bytevector operations
  5. (ice-9 binary-ports))
  6. (define read-file-to-bytevector
  7. (λ (path)
  8. (call-with-input-file path get-bytevector-all)))