Skip to content
instance method

Pathname#read

(?::Integer length, ?::Integer offset, ?mode: ::Integer | ::String, ?flags: ::Integer, ?external_encoding: ::encoding, ?internal_encoding: ::encoding, ?encoding: ::encoding, ?textmode: ::boolish, ?binmode: ::boolish, ?autoclose: ::boolish) -> ::String
read(...)

See File.read. Returns all data from the file, or the first N bytes if specified.

See also #pipe? #readable? #parent #readable_real? also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0