Reads a file from the local filesystem and returns its contents.
Example - Append file and get line count
function OnStart()
{
app.WriteFile( "myFile.txt", "Hello World from Copy\n", "Append" );
var txt = app.ReadFile("myFile.txt");
var length = txt.split("\n").length;
app.ShowPopup("myFile contains " + length + " lines");
}
from native import app
def OnStart():
app.WriteFile("myFile.txt", "Hello World from Copy\n", "Append")
txt = app.ReadFile("myFile.txt")
length = len(txt.split("\n"))
app.ShowPopup("myFile contains " + str(length) + " lines")