| |
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:
If the file was read successfully, an array is returned with
numlines elements
where element i contains line
fromline+i
of the file with name file.
If an error occurred while reading the file, a string is
returned denoting the error message.
Configuration:
The function is not allowed in secure mode.
Example:
// 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(), utime(), writefile.
This page was dynamically generated by the
web application development tool RADpage
of H.E.I.
Try the AJAX Article
(in German) on www.h-e-i.de.
© 1996-2025 H.E.I. All Rights Reserved.
|