Share this page

# IOA.read

Returns all the data from the specified file. Converts the data from the specified charset to unicode.

    IOA.read(fileName, charset);

## Arguments

Name | Description
--- | ---
fileName | (string) The absolute path of the file.
charset Optional) | (string) The charset of the file, if it is not UTF-8. Supported charsets: ['binary', 'UTF-8', 'UTF-16', 'base64', 'ANSI']

## Return value

A promise fulfilled with a string upon success. Returns content of the specified file.

## Example

Copy code

    IOA.read(TC.scriptDir + "mylog.txt").then(function(data){
      TCA.done();
    }).catch(function (error) {
      TCA.doneWithError(error);
    });

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: