std-fopen | ![]() |
std-fopen opens the file specified with fname fro reading, writing or appending, as with open. On success it adds the returned file to a global list *FOPEN* to be able to close it on any error while processing the file, therefore it should be used instead of open.
This is workaround for the common lisp macro with-open-file.
For possible problems see the section on open.
mode-char must be either "r", "w" or "a"
Note: You may not use the file atom returned by std-fopen for any binio-xxx function!
(std-fopen "TEST.INI" "w") => <FILE:0xxx>
fname: a string. A partial or fully qualified filename specifier.
An atom of type FILE on sucess or nil.
It opens a file for reading, writing or appending.
On success it adds the FILE atom to the global list *FOPEN*
Otherwise it throws an error. Operating system exceptions might occur.
(std-require 'STDFILE)
Defined in STDFILE