This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

open-output-file: overwrite or append


The Kawa document says about open-output-file and open-binary-output-file,
"If a file with the given name already exists, the effect is unspecified".

I woud like a way of specifying overwriting or appending for opening an
output file. 

Without this option, when we want the target file to be overwritten
if it exists, which I assume is the usual case, we have to make sure
that the file does not exit.

I think, in many programming languages, when opening an output file,
overwriting is the default and appending is an option.

It may be a better practice to avoid overwriting to an existing file
by always writing to a temporary file. Does Kawa recommend this practice?
It is safer but less convevient.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]