Personally I would prefer rename to fail by default with an option to overwrite. It would make my code more robust.You'd still get the race condition, unless the underlying C API call was atomic - and we've seen that in a lot of cases this isn't the case (i.e. you'd first have to check for the file's existence, hence the race condition.)
Michael
In reply to Re^5: A DWIM too far?
by mpeppler
in thread A DWIM too far?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |