in reply to RE: Odd file rename
in thread Odd file rename
To be honest, I don't see where rename() would be less robust than the link() / unlink() combo. Both cases work only on the same file system, both cases do otherwise the Right Thing, except that rename() is atomic, where link / unlink are two different statements. In the case of failure, both statements leave the original file untouched, but if the unlink() fails, you are left with an additional link to the old file, which is not always what you want ...
Update : And even Larry Wall claims that rename is cool :
Besides, REAL computers have a rename() system call. :-)
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE: RE: Odd file rename
by lhoward (Vicar) on Jun 14, 2000 at 17:07 UTC |