readText method
Collapse the table of content
Expand the table of content

temp.readText method

Applies to Windows and Windows Phone

Reads the specified file. If the file doesn't exist, the specified default value is returned.

Syntax


var promise = WinJS.Application.temp.readText(fileName, def);

Parameters

fileName

Type: String

The file to read from.

def

Type: String

The 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

See also

temp

 

 

Show:
© 2016 Microsoft