chickadee » scheme » file » call-with-input-file

call-with-input-file string procprocedure
call-with-output-file string procprocedure

It is an error if proc does not accept one argument.

These procedures obtain a textual port obtained by opening the named file for input or output as if by open-input-file or open-output-file. The port and proc are then passed to a procedure equivalent to call-with-port.