Skip to content

Commit

Permalink
Add eof() function (#5)
Browse files Browse the repository at this point in the history
Dispatch eof to the underlying I/O stream.
  • Loading branch information
xue-cheng authored and traktofon committed May 10, 2019
1 parent e7834c8 commit e86d04a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/file.jl
@@ -1,4 +1,4 @@
import Base: close, show
import Base: close, show, eof

struct FortranFile{A<:AccessMode, C<:Conversion}
io :: IO # the underyling I/O stream
Expand Down Expand Up @@ -69,6 +69,9 @@ rewind(f::FortranFile) = seek(f.io, 0)
close(f::FortranFile) = close(f.io)


eof(f::FortranFile) = eof(f.io)


function show(io::IO, f::FortranFile)
print(io, "FortranFile(")
show(io, f.io)
Expand Down

0 comments on commit e86d04a

Please sign in to comment.