#include #include int main(void) { unsigned int buffer_size; char *buffer; CosmsFileError error = cosms_core_file_read("test.txt", &buffer, &buffer_size); if (error != COSMS_FILE_OK) { fprintf(stderr, "failed to read file exited with error code: %d\n", error); return -1; } printf("File read with content:\n %s\n", buffer); char *temp_buffer = "Hello, World!"; error = cosms_core_file_write("write-file.txt", temp_buffer, 13, true); if (error != COSMS_FILE_OK) { fprintf(stderr, "failed to write file exited with error code: %d\n", error); return -1; } return 0; }