I\'m trying to create a folder if it doesn\'t exist. I\'m using Windows and I am not interested on my code working in other platforms.
Never mind, I found the solution.
The POSIX-compatible call is mkdir. It silently fails when the directory already exists.
mkdir
If you are using the Windows API, then CreateDirectory is more appropriate.