Hello, The default behavior of the File IO streams is to overwrite what was already in the file. IF you want to append, you have to specifically flag it in the constructor to do so. If the data is important to keep around, or is needed for auditing or something, then I would make a back-up copy of the file before you overwrite it. You can use whatever schema you want for that, and it depends on how long you want to keep back-up copy's around. Here is a basic app that I wrote up real quick to show some of the ways you can use File IO. Hope this helps in answering your question!
------------------ Cheers, RL
posted 17 years ago
Thanks Ryan..that was really helpful!! I need to brush up on my I/O knowledge. :-)
The knights of nee want a shrubbery. And a tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database