SYNOPSIS
string read_file(string file, int start, int number, string encoding)
DESCRIPTION
Reads lines from file.
If <start> is not given or 0, the file is read from the
beginning, else the efun starts reading at the beginning of line
<start>.
If <number> is not given or 0, the whole file is read, else
just the given amount of lines.
<encoding> denotes the encoding to be used for decoding the file.
If it is not given or 0, the H_FILE_ENCODING driver hook will
be used.
If <start> would be outside the actual size of the file, 0 is
returned instead of a string.
The maximum number of characters (not lines!) being read per
call is LIMIT_FILE (see query_limits()).
HISTORY
LDMud 3.6.0 added the <encoding> parameter.
SEE ALSO
read_bytes(E), write_file(E), hooks(C)
|