HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/ri/3.0.0/system/IO/read-c.ri
U:RDoc::AnyMethod[iI"	read:ETI"
IO::read;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"JOpens the file, optionally seeks to the given +offset+, then returns ;TI"I+length+ bytes (defaulting to the rest of the file).  #read ensures ;TI")the file is closed before returning.;To:RDoc::Markup::BlankLineo;
;	[I"PIf +name+ starts with a pipe character (<code>"|"</code>), a subprocess is ;TI"Hcreated in the same way as Kernel#open, and its output is returned.;T@S:RDoc::Markup::Heading:
leveli:	textI"Options;T@o;
;	[I"1The options hash accepts the following keys:;T@o:RDoc::Markup::List:
@type:	NOTE:@items[o:RDoc::Markup::ListItem:@label[I":encoding;T;	[	o;
;	[I"string or encoding;T@o;
;	[I"MSpecifies the encoding of the read string.  +:encoding+ will be ignored ;TI"Lif +length+ is specified.  See Encoding.aliases for possible encodings.;T@o;;[I"
:mode;T;	[	o;
;	[I"string or integer;T@o;
;	[I"CSpecifies the <i>mode</i> argument for open().  It must start ;TI"4with an "r", otherwise it will cause an error. ;TI"/See IO.new for the list of possible modes.;T@o;;[I":open_args;T;	[	o;
;	[I"
array;T@o;
;	[I"KSpecifies arguments for open() as an array.  This key can not be used ;TI"7in combination with either +:encoding+ or +:mode+.;T@o;
;	[I"Examples:;T@o:RDoc::Markup::Verbatim;	[	I"sIO.read("testfile")              #=> "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
;TI"BIO.read("testfile", 20)          #=> "This is line one\nThi"
;TI"BIO.read("testfile", 20, 10)      #=> "ne one\nThis is line "
;TI"@IO.read("binfile", mode: "rb")   #=> "\xF7\x00\x00\x0E\x12";T:@format0:
@fileI"	io.c;T:0@omit_headings_from_table_of_contents_below0I"=IO.read(name, [length [, offset]] [, opt] )   -> string
;T0[I"-(p1, p2 = v2, p3 = v3, p4 = v4, p5 = {});T@GFI"IO;TcRDoc::NormalClass00