These procedures are provided by all implementations.
Returns
#tif the specified file exists. Otherwise, returns#f. If the underlying implementation does not support this feature then#fis always returned.
Deletes the file specified by filename. If filename can not be deleted,
#fis returned. Otherwise,#tis returned.
filename should be a string naming a file.
open-filereturns a port depending on the symbol modes:
- r
- an input port capable of delivering characters from the file.
- rb
- a binary input port capable of delivering characters from the file.
- w
- an output port capable of writing characters to a new file by that name.
- wb
- a binary output port capable of writing characters to a new file by that name.
If an implementation does not distinguish between binary and non-binary files, then it must treat rb as r and wb as w.
If the file cannot be opened, either #f is returned or an error is signalled. For output, if a file with the given name already exists, the effect is unspecified.
Closes the file associated with port, rendering the port incapable of delivering or accepting characters.
close-filehas no effect if the file has already been closed. The value returned is unspecified.
Proc should be a procedure that accepts as many arguments as there are ports passed to
call-with-open-ports.call-with-open-portscalls proc with ports .... If proc returns, then the ports are closed automatically and the value yielded by the proc is returned. If proc does not return, then the ports will not be closed automatically unless it is possible to prove that the ports will never again be used for a read or write operation.
Returns a pathname for a file which will likely not be used by any other process. Successive calls to
(tmpnam)will return different pathnames.
Returns the current port to which diagnostic and error output is directed.
Forces any pending output on port to be delivered to the output device and returns an unspecified value. The port argument may be omitted, in which case it defaults to the value returned by
(current-output-port).
port must be open to a file.
file-positionreturns the current position of the character in port which will next be read or written. If the implementation does not support file-position, then#fis returned. — Function: file-position port k
port must be open to a file.
file-positionsets the current position in port which will next be read or written. If successful,#tis returned; otherwisefile-positionreturns#f.