A short function to demonstrate writing strings to a file. If append (orxTRUE) is passed, the string is appended to the file. If orxFALSE is passed, the string overwrites the existing contents.
void AppendToFile(const orxSTRING string, orxBOOL append){ orxS32 flags = orxFILE_KU32_FLAG_OPEN_APPEND | orxFILE_KU32_FLAG_OPEN_WRITE; if (append == orxFALSE){ flags = orxFILE_KU32_FLAG_OPEN_WRITE; } orxFILE *file = orxFile_Open ("my_file_on_disk.txt", flags); orxFile_Print(file, string); orxFile_Close(file); }