Next: , Previous: , Up: File Objects   [Contents][Index]


5.26.2.2 Destroying File Objects

The easiest way to close a file is simply to eliminate all references to it, subsequently the garbage collector will close it for you. It is better to close files explicitly though since only a limited number of files may be opened concurrently.

Function: close-file file-object

This function closes the file pointed to by the file object file-object.

Subsequently, any stream accesses file-object are illegal and will signal an error.