|
readFileLines
| Format:
readFileLines (file [, fromline [, numlines]]) |
Purpose:
Reads (part of) a text file.
The parameter file must be a filename and of type string,
fromline and numlines are integers.
If fromline is not given it defaults to 0.
If numlines is not given it defaults
to all lines starting from
fromline
to the end of the file.
Return Values:
Returns an array with
numlines elements
where element i contains line
fromline+i
of the file with name file.
Configuration:
The function is not allowed in secure mode.
Example:
heitml input:
// This example shows how to use the readFileLines function and the
// writefile tag to implement an appendfile function:
<defenv appendFile f;
c=readFileLines(f);
writefile f;
? c "\r\n%A";
defbody;
/writefile;
/defenv>
|
See Also:
copyfile(), deletefile(), directory(),
mkdir(),
movefile(), stat(), writefile.
This page was dynamically generated by
heitml
© 1996-2009 H.E.I. All Rights Reserved
|