(define-module (file-utils)
#:export (get-file-contents))
(define (get-file-contents file-path)
(define (read-step)
(let ((c (read-char)))
(if (eof-object? c)
(current-output-port)
(begin
(display c)
(read-step)))))
(with-input-from-file file-path
(lambda ()
(with-output-to-string
(lambda ()
(set-port-encoding! (current-output-port) "utf-8")
(read-step))))))