Skip to content
Prev 207349 / 398513 Next

End of File for binary files

I am using readBin to continuously read characters from the binary file. I'm
trying to figure out how many characters are in the file. What I would like
to do is something like
(while! EOF)
{
charRead <-.Internal(readBin(con,"character",1L,NA,TRUE,swap))
i++
}

I'm not clear on how to determine the EOF condition in this case.