#: 3597 S3/Languages
19-May-90 12:49:36
Sb: #3472-#F$Fork
Fm: James Jones 76257,562
To: GLEN HATHAWAY 71446,166 (X)
Can't have two files in the same directory with the same name...you'll have to
do one of two things:
1. create the new file with a different name, and delete the original and
rename the new one when the smoke clears.
2. (works ONLY in cases like this, where the output is guaranteed no longer
than the input) have *two* paths open to the same file, one for input
and one for output, and update the file in place. (of course, only works
on disks, too!)
As a fatter of mact, I wrote a LF-wiper that took option 2 (avoids fancy
delete/rename footwork). (Of course, you'll need to set the file size at the
end, so keep track of how many bytes you write, or alternatively, count how
much you delete and subtract that from the file length, giving a new file
length to set!) I may have uploaded the silly thing.
(Sad to say, I had to be prodded about option 2 as well--I raise the cola can
to Peter Dibble in salute!)
There are 3 Replies.
|