From e86d04a9220be3f01d464f32cb75e63fe5433416 Mon Sep 17 00:00:00 2001 From: Xue Cheng Date: Sat, 11 May 2019 01:56:28 +0800 Subject: [PATCH] Add eof() function (#5) Dispatch eof to the underlying I/O stream. --- src/file.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/file.jl b/src/file.jl index 2e919f1..0e088e1 100644 --- a/src/file.jl +++ b/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 @@ -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)