Here is a tutorial about file IO in RBD knowledge center: https://www.ibm.com/support/knowledgecenter/en/SSMQ79_9.5.1/com.ibm.egl.pg.doc/topics/pegl_core_fileio_tsk.html
You can get more docs by searching file in the KC.
Notice that, RUI cannot access file directly due the restriction of JS. You'll need to do the file IO in the backend EGL service.
Senior Technical Specialist
RBD, HCL Software, HCL Technologies Ltd.
EGL Development User Group