Skip to content

Commit

Permalink
add isopen(::File)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Jul 29, 2013
1 parent 87b1596 commit 4ec1e0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/fs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export File,
S_IRGRP, S_IWGRP, S_IXGRP, S_IRWXG,
S_IROTH, S_IWOTH, S_IXOTH, S_IRWXO

import Base: uvtype, uvhandle, eventloop, fd, position, stat, close, write, read, readall,
import Base: uvtype, uvhandle, eventloop, fd, position, stat, close, write, read, readall, isopen,
_sizeof_uv_fs

include("file_constants.jl")
Expand All @@ -55,6 +55,8 @@ type AsyncFile <: AbstractFile
open::Bool
end

isopen(f::Union(File,AsyncFile)) = f.open

uvtype(::File) = Base.UV_RAW_FD
uvhandle(file::File) = file.handle

Expand Down

0 comments on commit 4ec1e0e

Please sign in to comment.