"qwerty" <no@email.net> wrote in message
news:lk********************************@4ax.com...
You can always check if the directory exist, if exists then generate
another guid.
Probably not worth it in final analysis. AFAIK GUID's are pretty much
guaranteed to be unique in time and space. Considering that GUIDs would be
sufficient to have a million for each cubic lightyear in the entire
universe, you can see that the solution space is quite large (to say the
least). Then, the GUID generation algorithm is designed to avoid collisions.
In fact, IIRC, you could only get a GUID collision on current hardware
before the heat death of the universe if the two machines shared the same
MAC address. As for the on the same machine, I'm pretty sure you'll watch
the Gnab Big before you got a collision.
Putting in checking code for such an infinitesimally small chance is
probably just a waste of processor cycles. If it makes you happier to put
the check in though, go ahead, since I doubt the performance impact will
have any realistic impact on your code.
As you can see, I'm a bit conflicted as to how I'd approach this ;D