The nexuslua function readfile reads the complete file from the given path and returns it as a string. For an example, see addagent.