# $file.read Reads a text file
Usage
    $file.read(<filename>[,<size>[,<flags>]])
Description
Reads at most <size> bytes of the file pointed by <filename>. <size> is an upper limit but may be not reached if the real file is smaller. The data read is returned as a string , so if the file contains binary data, expect strange results. If <size> is not specified, then KVIrc tries to read the whole file up to the 1 MB limit (so if you want to read a file that is bigger thatn 1 MB then you MUST specify the <size>). WARNING: always check the file size before attemting to read a whole file... reading a CDROM iso image may sit down your system :) (and will prolly crash while allocating memory , before attempting to read anything) An empty string is returned if a serious error occures. The <filename> is adjusted according to the system that KVIrc is running on. Flags are actually limited to the single letter 'l'. By default the file is decoded from the ut8 characters set. If 'l' is present the the file is decoded by using the local 8 bit character set instead.
Syntax Specification
    <string> $file.read(<filename:string>[,<size:integer>[,<flags:string>]])
Examples
        echo $file.read(/proc/cpuinfo)
See also
$file.readbinary

Index, Functions

KVIrc 3.4.0 Documentation
Generated by root at Mon Dec 22 00:58:26 2008