I was writing archiving code using ZipForge components and wanted to
offer the user the ability to accept an over-write of the current archive
made on the same day thus having the same name, or deleting the first and
making a new Archive altogether. Now when a normal file copy is made, or a
new file created with the same name Windows offers an over-write prompt
warning you of the situation, but the TFileStream Class does not. Zipforge
I found out depends on this class to handle the writing of the archive to
disk, and has a number of its own parameters which work with those of the
FileStream. I assumed, and I think the authors did also, that if using the
fmCreate parameter, and there was already a file of the same name in the
target directory that Windows would give an over-write warning. Leaving the
parameter blank or setting it to fmOverwrite would not...it would simply
overwrite the file. But it seems there's no way to get an overwrite warning
when using this class. You need to write it yourself.
from Robert Meek dba Tangentals Design CCopyright 2006
"When I examine myself and my methods of thought, I come to the conclusion
that the gift of Fantasy has meant more to me then my talent for absorbing
positive knowledge!"
Albert Einstein
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi