# readfile

### (PRO) readfile(filePath)

Read the contents of the specified file .

### (PRO) readfile(filePath, suppressError)

Read the contents of the specified file; if suppressErrors is true, no exception will be generated if there is a problem reading the file.

### (PRO) readfile(filePath, suppressError, textEncoding)

Read the contents of the specified file using the specified text encoding - used for non-Unicode files.

## Arguments

Parameter | Data Type | Description
--- | --- | ---
filePath | String | Full path to the file to be read
suppressError | String | If "True", an error reading the file will not cause an error to be thrown
textEncoding | String | Specifies teh character encoding to use when reading the file. Default is UTF8 Allowed: UTF7, UTF16, ASCII

## Returns

Contents of the file as a string.

## Description

The entire contents of the file will be read into a string.

## Examples

Example |
--- | ---
readfile("c:\myDir\myfile.xt", "True", "UTF16") | Read the contents of the file "myfile.txt", assuming that the file is in UTF16 character set.

### See Also

writefile()