# $file.read

Reads a text file

Syntax

    $file.read(<filename>[,<size>])

Description

Reads at most <size> bytes of the file pointed by <filename>.
The data read is returned as a string , so if the file contains binary data, expect strange results.
If <size> is not specified , the whole file is readed.
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.

See also
[fnc]$file.readbinary[/file]

Main index, Function index

KVirc 3.0.0 documentation
Generated by root at Thu Apr 29 12:41:05 2004