Determines whether ColdFusion has reached the end of the file while reading it.
Yes, if the end of the file has been reached; No, otherwise.
System functions, Decision functions
FileIsEOF(fileObj
)
FileClose, FileOpen, FileRead, FileReadLine
ColdFusion 8: Added this function.
Parameter |
Description |
---|---|
fileObj |
The file object. |
The following example reads a file until it reaches the end of the file:
<h3>FileIsEOF Example</h3> <cfscript> myfile = FileOpen("c:\ColdFusionScorpio\wwwroot\test1.txt", "read"); while(NOT FileIsEOF(myfile)) { x = FileReadLine(myfile); WriteOutput("#x# <br>"); } FileClose(myfile); </cfscript>