
Signature
Expert programming and consulting services available
See http://www.sturmnet.org (try /blog as well)
> I googled for "windows posix rename" and I came up with a few mailing
> list threads discussing the issue, with the general consent being that
> Windows can't do it - many things in Windows file handling aren't very
Unfortunatly , this is what I suspected :(
> POSIX compatible, after all.
I'm not really too interested in whether the behaviour is POSIX, but in
mechanisms to guarantee consistency during updates. I guess ill have to
live with the race-condition and data-loss possibility of the pattern:
if ( File.Exists(path) )
File.Remove(path);
File.Move(path, newpath);

Signature
Helge Jensen
mailto:helge.jensen@slog.dk
sip:helge.jensen@slog.dk
-=> Sebastian cover-music: http://ungdomshus.nu <=-
Oliver Sturm - 07 Sep 2005 11:36 GMT
>I'm not really too interested in whether the behaviour is POSIX, but in
>mechanisms to guarantee consistency during updates. I guess ill have to
[quoted text clipped - 3 lines]
> File.Remove(path);
> File.Move(path, newpath);
There's no way around that pattern, I think. But it should read:
if ( File.Exists(newpath) )
File.Remove(newpath);
File.Move(path, newpath);
Oliver Sturm

Signature
Expert programming and consulting services available
See http://www.sturmnet.org (try /blog as well)
Helge Jensen - 07 Sep 2005 11:43 GMT
> There's no way around that pattern, I think. But it should read:
>
> if ( File.Exists(newpath) )
> File.Remove(newpath);
> File.Move(path, newpath);
Thanks, for pointing out my typo ;)

Signature
Helge Jensen
mailto:helge.jensen@slog.dk
sip:helge.jensen@slog.dk
-=> Sebastian cover-music: http://ungdomshus.nu <=-