chibi-scheme/lib/chibi/config.sld
Alex Shinn 8b5eb68238 File descriptors maintain a reference count of ports open on them
They can be close()d explicitly with close-file-descriptor, and
will close() on gc, but only explicitly closing the last port on
them will close the fileno.  Notably needed for network sockets
where we open separate input and output ports on the same socket.
2014-02-20 22:32:50 +09:00

15 lines
726 B
Scheme

(define-library (chibi config)
(export make-conf conf? conf-load conf-load-in-path conf-load-cascaded
conf-verify conf-extend conf-append conf-set conf-unfold-key
conf-get conf-get-list conf-get-cdr conf-get-multi
conf-specialize read-from-file conf-source conf-head conf-parent
assoc-get)
(import (scheme base) (scheme read) (scheme write) (scheme file)
(scheme time) (srfi 1))
;; This is only used for config verification, it's acceptable to
;; substitute file existence for the stronger directory check.
(cond-expand
(chibi (import (only (chibi filesystem) file-directory?)))
(else (begin (define file-directory? file-exists?))))
(include "config.scm"))