fileReadLine
Description
Reads a line from an on-disk or in-memory file.
Categories
Related
History
ColdFusion
8: Added this function.
Syntax
FileReadLine(fileObj)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| fileObj | The file object |
Returns
The
line of the file.
Example
The
following example opens a file, reads each line, outputs each line,
and then closes the file.
<h3>FileReadLIne Example</h3>
<cfscript>
myfile = FileOpen("c:\ColdFusion9\wwwroot\test1.txt", "read");
while(NOT FileisEOF(myfile))
{
x = FileReadLine(myfile); // read line
WriteOutput("#x#");
}
FileClose(myfile);
</cfscript