with-input-from-file

Name

with-input-from-file -- Redirect input from file

Type: function

Synopsis

with-input-from-file( string proc, );

Arguments

string

An instance of <string> representing a file name

proc

A function of one parameter

Description

This function creates a new input port from the file name in the string as in open-input-file. It then calls the procedure with the new port. If the procedure returns, then the port will be closed as with close-input-port. If the procedure does not return, the port will not be closed until and unless it can be shown that the port cannot be used for any input operations.