On Jan 31, 2006, at 6:02 PM, Adam Ernst wrote:
On Jan 31, 2006, at 7:55 PM, Tomis E. wrote:
Well naturally you can not replace an existing file.
Hmmm... why not?
Because the OS wont let you ?
It's in use.
You could easily crash the app if the OS let you swap out files that
are in use.
So move the existing file somewhere else, or
rename the existing file. Then once you're sure the new file is in
place, delete the old one.
I could do that. But I'd rather not, if I don't have to.
I know the REALbasic IDE does this kind of temp-file-overwriting. How
do they handle it? Anyone?
On windows I'm not sure
On Carbon there is a SwapFiles call (I think it's even in the Carbon
Declare Library)
So you can write a temporary, then call SwapFiles and the OS does it in
one shot.
You can do some cool stuff with that as the processes using the files
don't even know it has happened.
Renaming can be messy, so I'd suggest moving.
Perhaps. But then the user wouldn't know where to find it.
Rename it in place
Dont move it elsewhere
_______________________________________________
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>
|