Please advise on how to read text from a txt or csv file using Tide SDK. I already tried the following:
var f = Ti.Filesystem.getFile(Ti.Filesystem.getDesktopDirectory(),'file.txt');
var fs = Ti.Filesystem.getFileStream(f);
fs.open(Ti.Filesystem.MODE_READ);
contents = fs.read();
But it returns a file object, not text from the file.