Module | FFI::IO |
In: |
lib/ffi/io.rb
|
This module implements a couple of class methods to play with IO.
@param [Integer] fd file decriptor @param [String] mode mode string @return [::IO] Synonym for IO::for_fd.
@param [read] io io to read from @param [AbstractMemory] buf destination for data read from io @param [nil, Numeric] len maximul number of bytes to read from io. If nil,
read until end of file.
@return [Numeric] length really read, in bytes
A version of IO#read that reads data from an IO and put then into a native buffer.
This will be optimized at some future time to eliminate the double copy.