we have a (currently undocumented) fileUtils context property, which you can use for that.
bool success = fileUtils.writeFile("myFile.txt", "myFileContentString")
you can also use it to read a file as Chris mentioned in this post.
Note that this is not officially supported as of now and you should carefully test your app if you use this!
Alternatively, you can implement something that fits your needs yourself in C++. Here is a simple example on how to do it.
Please let me know if that helps you or you need any further help!