While a browser can't write to the Web server file system, there is the function FileManager.save() which you found in the WebIQ documentation. Reading a file from the Web server is a basic and common function of the browser, therefore you do not need a special WebIQ function, just use common js script functions. Here is an example with XMLHttpRequest():
(function () {
var actions = shmi.pkg("visuals.session.userActions"); //get reference to userActions object
actions["readFile"] = function (p) {
const sFileName = 'test.txt'
let xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", sFileName, false);
xmlhttp.send();
if (xmlhttp.status == 200) {
let sRead = xmlhttp.responseText
console.log("reading OK")
console.log(sRead)
} else {
console.log("reading failed status=" + xmlhttp.status)
}
};
}());
... View more