Getting a safe path for a temporary file

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jan 18 08:00:30 PST 2015


On Sunday, 18 January 2015 at 11:21:52 UTC, Marc Schütz wrote:
> It's not different, and if you're still doing the O_EXCL open 
> afterwards, it's safe. I just assumed you were going to use the 
> generated filename without a further check. This is then 
> unsafe, no matter how the UUID is generated, and depending on 
> the RNG that's been used, they can be quite predictable. 
> Granted, the risk is low, but still...

tmpfile is more predictable: it generates sequential file names.


More information about the Digitalmars-d-learn mailing list