in reply to Re^2: Generate a unique ID
in thread Generate a unique ID
If you use a random identifier that is long enough, I do believe that it becomes irrelevant to seriously consider “collisions.” You will have won the Lottery in every state and every country, and retired to a place where you do not have to give a tinker’s dam about computers, long before a collision actually occurs.
The sequence that you expect to succeed will be: to create the directory, write some sentinel file into it, and verify that the sentinel file does exist. If you can do all that, you’re good to go.
If you cannot create the directory, then I submit that it is safe to assume that the reason is “permissions.” Even though meteors can fall from the sky and lodge themselves in your microwave oven just to the left of your turkey sandwich, you don’t need to test for them.
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Generate a unique ID
by BrowserUk (Patriarch) on Nov 15, 2010 at 20:19 UTC | |
by afoken (Chancellor) on Nov 15, 2010 at 20:48 UTC | |
by locked_user sundialsvc4 (Abbot) on Nov 17, 2010 at 14:37 UTC | |
by BrowserUk (Patriarch) on Nov 17, 2010 at 15:02 UTC | |
by locked_user sundialsvc4 (Abbot) on Nov 17, 2010 at 17:22 UTC | |
by BrowserUk (Patriarch) on Nov 17, 2010 at 17:58 UTC | |
by Anonymous Monk on Nov 17, 2010 at 15:38 UTC | |
by BrowserUk (Patriarch) on Nov 17, 2010 at 15:42 UTC | |
by Your Mother (Archbishop) on Nov 17, 2010 at 15:32 UTC | |
by BrowserUk (Patriarch) on Nov 17, 2010 at 15:37 UTC |