The "x" flag was added in C11/C++17, and prevents already existing files from being overwritten.
https://en.cppreference.com/c/io/fopen
File access mode flag "x" can optionally be appended to "w" or "w+" specifiers. This flag forces the function to fail if the file exists, instead of overwriting it.
There are two ways to implement this:
- Add the "x" flag just to
fopen (probably easier since no assembly code is involved)
- Add the "x" flag to
ti_Open (which in turn adds it to fopen)
The "x" flag was added in C11/C++17, and prevents already existing files from being overwritten.
https://en.cppreference.com/c/io/fopen
There are two ways to implement this:
fopen(probably easier since no assembly code is involved)ti_Open(which in turn adds it tofopen)