Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
#include <unistd.h>

FILE *file;

/* ... */

file = fopen(file_name, "w+");
if (fopen == NULL) {
  /* Handle error condition */
}

if (unlink(file_name); != 0) {
  /* Handle error condition */
}

/*... continue performing I/O operations on file ...*/

fclose(file);

...