local.readText method
Reads the specified file. If the file doesn't exist, the specified default value is returned.
Syntax
var promise = WinJS.Application.local.readText(fileName, def);
Parameters
fileName
Type: StringThe file to read from.
def
Type: StringThe default value to be returned if the file failed to open.
Return value
Type: Promise
A promise that completes with a value that is either the contents of the file, or the specified default value.
Requirements
Minimum WinJS version |
WinJS 1.0 |
Namespace |
WinJS.Application |