diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/hnh/util/io.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/module/hnh/util/io.scm b/module/hnh/util/io.scm index d638ebb4..6aed85ac 100644 --- a/module/hnh/util/io.scm +++ b/module/hnh/util/io.scm @@ -1,10 +1,11 @@ (define-module (hnh util io) :use-module ((hnh util) :select (begin1)) - :use-module ((ice-9 rdelim) :select (read-line)) + :use-module ((ice-9 rdelim) :select (read-line read-string)) :export (open-input-port open-output-port read-lines - with-atomic-output-to-file)) + with-atomic-output-to-file + read-file)) (define (open-input-port str) (if (string=? "-" str) @@ -62,3 +63,7 @@ ;; counted on, since anything with an unspecified return ;; value might as well return #f) #f)))) + + +(define (read-file path) + (call-with-input-file path read-string)) |