/usr/lib/s9fes/read-file.scm is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ; Scheme 9 from Empty Space, Function Library
; By Nils M Holm, 2009
; See the LICENSE file of the S9fES package for terms of use
;
; (read-file) ==> list
; (read-file input-port) ==> list
;
; Read a text file from an input port, return a list containing
; one string for each line read. When no INPUT-PORT is specified,
; read the current input port.
;
; (Example): (with-input-from-file "lib/read-file.scm" read-file)
; ==> [lots of lines]
(load-from-library "read-line.scm")
(define (read-file . port)
(letrec
((collect-lines
(lambda (ln lines)
(cond ((eof-object? ln)
(reverse! lines))
(else
(collect-lines (apply read-line port)
(cons ln lines)))))))
(collect-lines (apply read-line port) '())))
|