Re: Why doesn't (open ... :if-exists) support :truncate?



Richard M Kreuter wrote:
Howcome the standard OPEN ... :IF-EXISTS actions don't include an
option for truncating the file when the stream is created? The LispM
seems to have supported a :TRUNCATE here, implementations have always
had to support direct I/O in order to do :OVERWRITE or :APPEND, and
truncation is the natural way to open files under Unix at least; so I
wonder why there isn't a standard way to ask for this behavior.

Have you considered :supersede ? It isn't exactly the same as :truncate
(on certain operating systems, or some processes have the file open) but
the usual behavior will be the same.

Your "direct I/O" reference doesn't really mean anything. Perhaps you
should explain.
.



Relevant Pages