My app will be saving a growing text file to hard disk regularly.
This could be every 10 or 20 minutes or so, up to a maximum frequency of about once a minute. It will be used anywhere between 4hrs and 24hrs continuously when in use, but that might be once a week probably at most.
My data is held in a stringlist and I'm using
Code:
stringlist.SaveToFile('filename.txt');
Plan A was just to use the line above each time a save is required.
Plan B is to do this at each save:
Code:
if exists filename.bak then delete filename.bak;
rename filename.txt to filename.bak;
stringlist.SaveToFile('filename.txt');
Which would you think has best integrity, all in all, given the save frequency?
Steve (Delphi 2007 & XP)