fileIsEOF
Description
Determines whether ColdFusion has reached the end of an on-disk or in-memory file while reading it.
Categories
Related
History
ColdFusion
8: Added this function.
Syntax
FileIsEOF(fileObj)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| fileObj | The file object. |
Returns
Yes,
if the end of the file has been reached; No, otherwise.
Example
The
following example reads a file until it reaches the end of the file:
<h3>FileIsEOF Example</h3>
<cfscript>
myfile = FileOpen("c:\ColdFusion9\wwwroot\test1.txt", "read");
while(NOT FileIsEOF(myfile))
{
x = FileReadLine(myfile);
WriteOutput("#x# <br>");
}
FileClose(myfile);
</cfscript>