"Jacob Sparre Andersen" wrote in message news:87sj67r941.fsf@adaheads.sparre-andersen.dk... > Yannick Duch�ne wrote: > >> I disagree a bit, and this case may suggest to use locks. > > Which file systems/operationg systems allow an application to take a > lock on a directory? Don't know of any! And *assuming* that only your application can create/modify a file is looking for trouble, as such an assumption could be violated by accident (some other program using a similar file naming scheme) or maliciousness. In the real world, there are lots of things that you can't know in advance -- you are always going to need a way to propagate run-time errors, which is what exceptions excel at (much better than error codes, IMHO). Randy.