--- Adam Ernst <adam1234 at athenet dot net> wrote:
> On Jan 31, 2006, at 7:55 PM, Tomis E. wrote:
>
> > Well naturally you can not replace an existing file.
>
> Hmmm... why not?
Sorry for the confusion. I meant you can't replace an existing using
f.MoveFileTo, you would have
to delete/move/rename it and then move in the new file. That's been my
experience at least.
>....
>
> > Renaming can be messy, so I'd suggest moving.
>
> Perhaps. But then the user wouldn't know where to find it.
How so? Write new file to temp, move old file somewhere, move new file where
old file was. And
after checking to make sure the move was successful, delete the old file.
The users don't have to know where you move the files or even that you do swap
them out.
And if the app crashes, next time they run it you just display a dialog asking
if they want to
recover the files that were left in your temp swap directory, if they do then
you put the files on
their desktop or something. That's pretty much how any major program works.
AppleWorks, REALbasic,
etc.
Seams like maybe you think it's a bit harder than it is?
~ Tomis
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|