diff --git a/base/docs/helpdb/Base.jl b/base/docs/helpdb/Base.jl index b678eef80e9f6..96b5e4886d85c 100644 --- a/base/docs/helpdb/Base.jl +++ b/base/docs/helpdb/Base.jl @@ -8761,18 +8761,6 @@ Letter: Lowercase. """ islower -""" - read(stream::IO, nb=typemax(Int); all=true) - -Read at most `nb` bytes from `stream`, returning a `Vector{UInt8}` of the bytes read. - -If `all` is `true` (the default), this function will block repeatedly trying to read all -requested bytes, until an error or end-of-file occurs. If `all` is `false`, at most one -`read` call is performed, and the amount of data returned is device-dependent. Note that not -all stream types support the `all` option. -""" -read - """ eig(A,[irange,][vl,][vu,][permute=true,][scale=true]) -> D, V diff --git a/base/iostream.jl b/base/iostream.jl index bd675c345b75c..2ad0b41d492fa 100644 --- a/base/iostream.jl +++ b/base/iostream.jl @@ -246,6 +246,16 @@ function read(s::IOStream) resize!(b, nr) end +""" + read(s::IOStream, nb::Integer; all=true) + +Read at most `nb` bytes from `s`, returning a `Vector{UInt8}` of the bytes read. + +If `all` is `true` (the default), this function will block repeatedly trying to read all +requested bytes, until an error or end-of-file occurs. If `all` is `false`, at most one +`read` call is performed, and the amount of data returned is device-dependent. Note that not +all stream types support the `all` option. +""" function read(s::IOStream, nb::Integer; all::Bool=true) b = Array{UInt8}(nb) nr = readbytes!(s, b, nb, all=all) diff --git a/doc/stdlib/io-network.rst b/doc/stdlib/io-network.rst index cb1ecfdb361c8..97e8c7c0c286a 100644 --- a/doc/stdlib/io-network.rst +++ b/doc/stdlib/io-network.rst @@ -168,11 +168,11 @@ General I/O See ``read`` for a description of the ``all`` option. -.. function:: read(stream::IO, nb=typemax(Int); all=true) +.. function:: read(s::IOStream, nb::Integer; all=true) .. Docstring generated from Julia source - Read at most ``nb`` bytes from ``stream``\ , returning a ``Vector{UInt8}`` of the bytes read. + Read at most ``nb`` bytes from ``s``\ , returning a ``Vector{UInt8}`` of the bytes read. If ``all`` is ``true`` (the default), this function will block repeatedly trying to read all requested bytes, until an error or end-of-file occurs. If ``all`` is ``false``\ , at most one ``read`` call is performed, and the amount of data returned is device-dependent. Note that not all stream types support the ``all`` option.