(Information and examples taken from the DroidScript documentation)
The ReadFile method reads a text file from internal or external file storage.
txt = app.ReadFile( fileName, encoding );
See also WriteFile
function OnStart() { txt = app.ReadFile( "/Sys/Html/Page.htm" ); app.ShowPopup( txt ); }
Encoding-options |
---|
windows-1252 |
ISO-8859-1 |
US-ASCII |
UTF-16 |
UTF-16BE |
UTF-16LE |
UTF-8 |
Information from: Dave Smart group thread “app.CreateWebServer return file” 04:17