Name

ReadFile() — Reads the contents of a file in to a variable

Synopsis

ReadFile(variable=filename,length)

ReadFile captures the contents of filename, with a maximum size of length.

; read the first 80 characters of a file in to a variable
exten => 123,1,Answer()
exten => 123,n,ReadFile(TEST=/tmp/test.txt,80)
exten => 123,n,SayAlpha(${TEST})

See Also

System(), Read()