method

sysread

v1_8_7_72 - Show latest stable - Class: IO
sysread(...)
public

Reads integer bytes from ios using a low-level read and returns them as a string. Do not mix with other methods that read from ios or you may get unpredictable results. Raises SystemCallError on error and EOFError at end of file.

   f = File.new("testfile")
   f.sysread(16)   #=> "This is line one"