Many functions that perform file operations accept either open or closed streams as arguments; see Stream Arguments to Standardized Functions.
Of these, the functions in Figure 20–2 treat open and closed streams differently.
delete-file | file-author | probe-file |
directory | file-write-date | truename |
Since treatment of open streams by the file system may vary considerably between implementations, however, a closed stream might be the most reliable kind of argument for some of these functions—in particular, those in Figure 20–3. For example, in some file systems, open files are written under temporary names and not renamed until closed and/or are held invisible until closed. In general, any code that is intended to be portable should use such functions carefully.