In this situation, we must return to Java.
You are trying to call the ui.save method, which according to the man ui.savefollowing:
> man ui.save
---------------------------------------------
ui.save(String filePath, InputStream content)
---------------------------------------------
Save the content of the InputStream to the given path.
, InputStream. Rhino Java. , , ...
var stream = new java.io.ByteArrayInputStream(
new java.lang.String("Example String").getBytes("UTF-8") );
( , )
ui.save("/test/test.txt", stream);