~ chicken-r7rs (master) /scheme.file.scm
Trap1(module scheme.file (call-with-input-file2 call-with-output-file3 call-with-input-file4 delete-file5 open-binary-input-file6 open-input-file7 with-input-from-file8 call-with-output-file9 file-exists?10 open-binary-output-file11 open-output-file12 with-output-to-file)13 (import scheme chicken.type)14 (import (rename (only chicken.file delete-file file-exists?)15 (file-exists? chicken-file-exists?)))1617 ;; CHICKEN's file-exists? returns the filename when true,18 ;; whereas R7RS requires it to return #t or #f.1920 (: file-exists? (string -> boolean))2122 (define (file-exists? filename)23 (and (chicken-file-exists? filename) #t))2425 (: open-binary-input-file (string -> input-port))26 (: open-binary-output-file (string -> output-port))2728 (define (open-binary-input-file path) (open-input-file path #:binary))29 (define (open-binary-output-file path) (open-output-file path #:binary))3031)