int OasE::writeToFileStream(char *data, size_t size, size_t nmemb, std::ofstream* filestream){ int result = 0; // Is there anything in the buffer? if (filestream != NULL) { // Append the data to the buffer *filestream << data; // How much did we write? result = size * nmemb; } return result; }