string readFileText(string filePath, int maxCharsToRead = -1)
Reads characters from a file
Security
Trust Level Required: Full Trust
Parameters
Name | Description |
filePath |
string The path of the file |
maxCharsToRead |
(Optional) int The maximum number of characters to read, or -1 to read until the end of the file |
Return
The file text
Examples
var fileDetails = KioFileIO.getFileDetails('/home/kiosk/Documents/Test.txt');
if (fileDetails.exists)
console.log(KioFileIO.readFileText('/home/kiosk/Documents/Test.txt', 0, fileDetails.length));
Requirements
KioWare OS (Linux®) version 1.0 or greater.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.