read file( path a[, encoding b] )


Reads in the file a and creates a text using UTF8 or the encoding specified in b.

The maximum file size is 4 MB. Trying to read in bigger files will lead to an error. Note: Setting system property -Dhub.datawizard.filter.readFileMaxLength=512 (in ./bin/hub.bat for Windows and ./bin/execute.sh for Linux/Unix) allows you to increase the maximum size (here to 512 MB).

The filename can be specified relative or absolute. The file must exist and be readable, otherwise, the function will stop with an error. Empty files are accepted.

The data being read is cached. Subsequent calls of this function will use the data from there to prevent performance loss.

Description of Parameters

Parameter

Description

a

Relative or absolute filename.

b

(optional) Encoding. Default: UTF8