eof: End of file

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Check for the end of file.

Usage

1
eof(con)

Arguments

con

A connection

Details

This function tries to read a file, if there's more data then it rewinds and returns true. If the file is not seekable the end of file check is not performed, because we wouldn't be able to rewind.

Value

A logical, TRUE if end of file is reached.

Note

Checking for end of files explicitly is rarely necessary.

Author(s)

Fedor Baart

References

I probably copied this code from somewhere but I can't find the source anymore.

See Also

connections, readLines

Examples

1
2
f <- file()
eof(f)

sealevel documentation built on May 2, 2019, 6:51 p.m.