file-at-end?2.0

file-at-end?

Reports true when there are no more characters left to read in from the current file (that was opened previously with file-open). Otherwise, reports false.

file-open "my-file.txt"
print file-at-end?
=> false ;; Can still read in more characters
print file-read-line
=> This is the last line in file
print file-at-end?
=> true ;; We reached the end of the file

See also file-open, file-close-all.

Take me to the full NetLogo Dictionary