var managedFile = tw.system.model.findManagedFileByPath("somefile.csv", TWManagedFile.Types.Web);
log.error("Got the managed file!: " + managedFile);
// load the textual content into a variable
var textualContent = managedFile.readText();
// write the file to filesystem
managedFile.writeDataToFile("/tmp/somefile.csv");