You want to write text or data to a file.
If you just have a string
s to write to a file with name
fname, this will work:
500 Can't connect to 127.0.0.1:8778 (connect: Connection refused)
Or, for the truly lazy, you can redirect standard out with
with-output-to-file and just use
display with no port argument:
500 Can't connect to 127.0.0.1:8778 (connect: Connection refused)
If you have a list of strings, you can join the list into a string, or you can write something like this (assuming
string-list is your list of strings):
500 Can't connect to 127.0.0.1:8778 (connect: Connection refused)
PLT's implementation of
call-with-output-file takes optional arguments on the end.
'replace is a very important one, without this flag,
call-with-output-file will fail if the file already exists:
500 Can't connect to 127.0.0.1:8778 (connect: Connection refused)
'truncate works slightly different from
'replace,
'replace is documented to remove the old file before writing a new one, while
'truncate is documented to set the file length to 0 before writing. You can also use
'append to append to the end of a file, or 'update, which raises an exception if the file does not exist.
--
GordonWeakliem - 13 Aug 2004