JavaScript

{dialog.object}phoneGapReadFile Method

Syntax

{dialog.object}.phoneGapReadFile(fileName,onReadFile,onReadFileERROR);

Arguments

fileName

The name of the file to read.

onReadFile

A javascript function to call when the file read succeeds.

onReadFileERROR

A javascript function to call if an error occurs when trying to read the file.

Description

Reads the contents of a text file in the file system of the mobile device.

Discussion

The phoneGapReadFile method reads the contents of a text file in the file system of the mobile device. The method is asynchronous. Calls the onReadFile function if the method succeeded. Calls the onReadFileERROR function is the method failed.

Example

//
{dialog.object}.phoneGapReadFile(fileName,onReadFile,onReadFileERROR);