3 ms·
It has never been good practice to check before open - open first, then check. And if you're creating a file, use exclusive mode, don't check first. You're ope
by unilynx 6y ago
It has never been good practice to check before open - open first, then check. And if you're creating a file, use exclusive mode, don't check first.
You're opening yourself up to a lot of race conditions otherwise, and this has been the source of many security vulnerabilities