Next: , Previous: , Up: stdlib   [Index]


5.9 File system

This chapter describes the (rnrs files (6)) library for operations on the file system. This library, in addition to the procedures described here, also exports the I/O condition types described in section stdlib io conditions.

Procedure: file-exists? filename

filename must be a file name.

The file-exists? procedure returns #t if the named file exists at the time the procedure is called, #f otherwise.

Procedure: delete-file filename

filename must be a file name.

The delete-file procedure deletes the named file if it exists and can be deleted, and returns unspecified values. If the file does not exist or cannot be deleted, an exception with condition type &i/o-filename is raised.