Archive: How to check end of file reached in nsis?


How to check end of file reached in nsis?
I have written some values in temporary file.I have processed temp file retrieving values.If the all values retrieved then only delete the temp file.I dont know how to check end of file?

Function tempwrite
FileOpen $0 "$INSTDIR\temp.txt" "r"
loop:
FileRead $0 $1
IfErrors done
//Do some stuff

done:
FileClose $0
Delete /REBOOTOK $INSTDIR\temp.txt

FunctionEnd

I want to check end of file before delete temp file? How to check end of file reached?


It's all in the manual: http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.5.3