Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.222
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby31 /
share /
ri /
system /
IO /
Delete
Unzip
Name
Size
Permission
Date
Action
Buffer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ConsoleMode
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
EAGAINWaitReadable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
EAGAINWaitWritable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
EINPROGRESSWaitReadable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
EINPROGRESSWaitWritable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
EWOULDBLOCKWaitReadable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
EWOULDBLOCKWaitWritable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WaitReadable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WaitWritable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
generic_readable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
generic_writable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
%3c%3c-i.ri
715
B
-rw-r--r--
2025-04-28 21:06
advise-i.ri
2.44
KB
-rw-r--r--
2025-04-28 21:06
autoclose%3d-i.ri
635
B
-rw-r--r--
2025-04-28 21:06
autoclose%3f-i.ri
429
B
-rw-r--r--
2025-04-28 21:06
beep-i.ri
226
B
-rw-r--r--
2025-04-28 21:06
binmode%3f-i.ri
344
B
-rw-r--r--
2025-04-28 21:06
binmode-i.ri
658
B
-rw-r--r--
2025-04-28 21:06
binread-c.ri
1.41
KB
-rw-r--r--
2025-04-28 21:06
binwrite-c.ri
1018
B
-rw-r--r--
2025-04-28 21:06
cdesc-IO.ri
30.2
KB
-rw-r--r--
2025-04-28 21:06
check_winsize_changed-i.ri
260
B
-rw-r--r--
2025-04-28 21:06
clear_screen-i.ri
242
B
-rw-r--r--
2025-04-28 21:06
close-i.ri
764
B
-rw-r--r--
2025-04-28 21:06
close_on_exec%3d-i.ri
1.01
KB
-rw-r--r--
2025-04-28 21:06
close_on_exec%3f-i.ri
678
B
-rw-r--r--
2025-04-28 21:06
close_read-i.ri
833
B
-rw-r--r--
2025-04-28 21:06
close_write-i.ri
873
B
-rw-r--r--
2025-04-28 21:06
closed%3f-i.ri
764
B
-rw-r--r--
2025-04-28 21:06
console-c.ri
637
B
-rw-r--r--
2025-04-28 21:06
console_mode%3d-i.ri
436
B
-rw-r--r--
2025-04-28 21:06
console_mode-i.ri
458
B
-rw-r--r--
2025-04-28 21:06
console_size-c.ri
284
B
-rw-r--r--
2025-04-28 21:06
cooked%21-i.ri
476
B
-rw-r--r--
2025-04-28 21:06
cooked-i.ri
561
B
-rw-r--r--
2025-04-28 21:06
copy_stream-c.ri
1.41
KB
-rw-r--r--
2025-04-28 21:06
cursor%3d-i.ri
234
B
-rw-r--r--
2025-04-28 21:06
cursor-i.ri
230
B
-rw-r--r--
2025-04-28 21:06
cursor_down-i.ri
242
B
-rw-r--r--
2025-04-28 21:06
cursor_left-i.ri
242
B
-rw-r--r--
2025-04-28 21:06
cursor_right-i.ri
244
B
-rw-r--r--
2025-04-28 21:06
cursor_up-i.ri
238
B
-rw-r--r--
2025-04-28 21:06
default_console_size-c.ri
374
B
-rw-r--r--
2025-04-28 21:06
each-i.ri
1.37
KB
-rw-r--r--
2025-04-28 21:06
each_byte-i.ri
830
B
-rw-r--r--
2025-04-28 21:06
each_char-i.ri
755
B
-rw-r--r--
2025-04-28 21:06
each_codepoint-i.ri
637
B
-rw-r--r--
2025-04-28 21:06
each_line-i.ri
888
B
-rw-r--r--
2025-04-28 21:06
echo%3d-i.ri
509
B
-rw-r--r--
2025-04-28 21:06
echo%3f-i.ri
434
B
-rw-r--r--
2025-04-28 21:06
eof%3f-i.ri
1.37
KB
-rw-r--r--
2025-04-28 21:06
eof-i.ri
1.39
KB
-rw-r--r--
2025-04-28 21:06
erase_line-i.ri
240
B
-rw-r--r--
2025-04-28 21:06
erase_screen-i.ri
244
B
-rw-r--r--
2025-04-28 21:06
expect-i.ri
1.44
KB
-rw-r--r--
2025-04-28 21:06
external_encoding-i.ri
457
B
-rw-r--r--
2025-04-28 21:06
fcntl-i.ri
765
B
-rw-r--r--
2025-04-28 21:06
fdatasync-i.ri
498
B
-rw-r--r--
2025-04-28 21:06
fileno-i.ri
615
B
-rw-r--r--
2025-04-28 21:06
flush-i.ri
572
B
-rw-r--r--
2025-04-28 21:06
for_fd-c.ri
316
B
-rw-r--r--
2025-04-28 21:06
foreach-c.ri
1.89
KB
-rw-r--r--
2025-04-28 21:06
fsync-i.ri
934
B
-rw-r--r--
2025-04-28 21:06
getbyte-i.ri
538
B
-rw-r--r--
2025-04-28 21:06
getc-i.ri
518
B
-rw-r--r--
2025-04-28 21:06
getch-i.ri
517
B
-rw-r--r--
2025-04-28 21:06
getpass-i.ri
635
B
-rw-r--r--
2025-04-28 21:06
gets-i.ri
3.24
KB
-rw-r--r--
2025-04-28 21:06
goto-i.ri
232
B
-rw-r--r--
2025-04-28 21:06
goto_column-i.ri
242
B
-rw-r--r--
2025-04-28 21:06
iflush-i.ri
406
B
-rw-r--r--
2025-04-28 21:06
inspect-i.ri
450
B
-rw-r--r--
2025-04-28 21:06
internal_encoding-i.ri
415
B
-rw-r--r--
2025-04-28 21:06
ioctl-i.ri
687
B
-rw-r--r--
2025-04-28 21:06
ioflush-i.ri
421
B
-rw-r--r--
2025-04-28 21:06
isatty-i.ri
610
B
-rw-r--r--
2025-04-28 21:06
lineno%3d-i.ri
869
B
-rw-r--r--
2025-04-28 21:06
lineno-i.ri
1000
B
-rw-r--r--
2025-04-28 21:06
new-c.ri
5.98
KB
-rw-r--r--
2025-04-28 21:06
noecho-i.ri
553
B
-rw-r--r--
2025-04-28 21:06
nonblock%3d-i.ri
420
B
-rw-r--r--
2025-04-28 21:06
nonblock%3f-i.ri
361
B
-rw-r--r--
2025-04-28 21:06
nonblock-i.ri
564
B
-rw-r--r--
2025-04-28 21:06
nread-i.ri
389
B
-rw-r--r--
2025-04-28 21:06
oflush-i.ri
407
B
-rw-r--r--
2025-04-28 21:06
open-c.ri
759
B
-rw-r--r--
2025-04-28 21:06
pathconf-i.ri
730
B
-rw-r--r--
2025-04-28 21:06
pid-i.ri
784
B
-rw-r--r--
2025-04-28 21:06
pipe-c.ri
2.65
KB
-rw-r--r--
2025-04-28 21:06
popen-c.ri
3.71
KB
-rw-r--r--
2025-04-28 21:06
pos%3d-i.ri
596
B
-rw-r--r--
2025-04-28 21:06
pos-i.ri
638
B
-rw-r--r--
2025-04-28 21:06
pread-i.ri
1.33
KB
-rw-r--r--
2025-04-28 21:06
pressed%3f-i.ri
236
B
-rw-r--r--
2025-04-28 21:06
print-i.ri
1.01
KB
-rw-r--r--
2025-04-28 21:06
printf-i.ri
439
B
-rw-r--r--
2025-04-28 21:06
putc-i.ri
679
B
-rw-r--r--
2025-04-28 21:06
puts-i.ri
1.04
KB
-rw-r--r--
2025-04-28 21:06
pwrite-i.ri
1.01
KB
-rw-r--r--
2025-04-28 21:06
raw%21-i.ri
593
B
-rw-r--r--
2025-04-28 21:06
raw-i.ri
1.08
KB
-rw-r--r--
2025-04-28 21:06
read-c.ri
2.15
KB
-rw-r--r--
2025-04-28 21:06
read-i.ri
3.08
KB
-rw-r--r--
2025-04-28 21:06
read_nonblock-i.ri
2.78
KB
-rw-r--r--
2025-04-28 21:06
readbyte-i.ri
362
B
-rw-r--r--
2025-04-28 21:06
readchar-i.ri
526
B
-rw-r--r--
2025-04-28 21:06
readline-i.ri
488
B
-rw-r--r--
2025-04-28 21:06
readlines-c.ri
1.99
KB
-rw-r--r--
2025-04-28 21:06
readlines-i.ri
1.17
KB
-rw-r--r--
2025-04-28 21:06
readpartial-i.ri
4.43
KB
-rw-r--r--
2025-04-28 21:06
ready%3f-i.ri
358
B
-rw-r--r--
2025-04-28 21:06
reopen-i.ri
893
B
-rw-r--r--
2025-04-28 21:06
rewind-i.ri
887
B
-rw-r--r--
2025-04-28 21:06
scroll_backward-i.ri
250
B
-rw-r--r--
2025-04-28 21:06
scroll_forward-i.ri
248
B
-rw-r--r--
2025-04-28 21:06
seek-i.ri
1.66
KB
-rw-r--r--
2025-04-28 21:06
select-c.ri
5.85
KB
-rw-r--r--
2025-04-28 21:06
set_encoding-i.ri
1.11
KB
-rw-r--r--
2025-04-28 21:06
set_encoding_by_bom-i.ri
910
B
-rw-r--r--
2025-04-28 21:06
stat-i.ri
595
B
-rw-r--r--
2025-04-28 21:06
sync%3d-i.ri
928
B
-rw-r--r--
2025-04-28 21:06
sync-i.ri
651
B
-rw-r--r--
2025-04-28 21:06
sysopen-c.ri
509
B
-rw-r--r--
2025-04-28 21:06
sysread-i.ri
991
B
-rw-r--r--
2025-04-28 21:06
sysseek-i.ri
698
B
-rw-r--r--
2025-04-28 21:06
syswrite-i.ri
678
B
-rw-r--r--
2025-04-28 21:06
tell-i.ri
661
B
-rw-r--r--
2025-04-28 21:06
to_i-i.ri
589
B
-rw-r--r--
2025-04-28 21:06
to_io-i.ri
281
B
-rw-r--r--
2025-04-28 21:06
try_convert-c.ri
653
B
-rw-r--r--
2025-04-28 21:06
tty%3f-i.ri
542
B
-rw-r--r--
2025-04-28 21:06
ungetbyte-i.ri
1.64
KB
-rw-r--r--
2025-04-28 21:06
ungetc-i.ri
1.51
KB
-rw-r--r--
2025-04-28 21:06
wait-i.ri
824
B
-rw-r--r--
2025-04-28 21:06
wait_priority-i.ri
452
B
-rw-r--r--
2025-04-28 21:06
wait_readable-i.ri
520
B
-rw-r--r--
2025-04-28 21:06
wait_writable-i.ri
452
B
-rw-r--r--
2025-04-28 21:06
winsize%3d-i.ri
498
B
-rw-r--r--
2025-04-28 21:06
winsize-i.ri
422
B
-rw-r--r--
2025-04-28 21:06
write-c.ri
2.42
KB
-rw-r--r--
2025-04-28 21:06
write-i.ri
788
B
-rw-r--r--
2025-04-28 21:06
write_nonblock-i.ri
2.55
KB
-rw-r--r--
2025-04-28 21:06
Save
Rename
U:RDoc::NormalClass[iI"IO:ET@I"Object;To:RDoc::Markup::Document:@parts[ o;;[ : @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"SExpect library adds the IO instance method #expect, which does similar act to ;TI"tcl's expect extension.;To:RDoc::Markup::BlankLine o;;[I":In order to use this method, you must require expect:;T@o:RDoc::Markup::Verbatim;[I"require 'expect' ;T:@format0o;;[I""Please see #expect for usage.;T; I"ext/pty/lib/expect.rb;T; 0o;;[�o;;[I"AThe IO class is the basis for all input and output in Ruby. ;TI"JAn I/O stream may be <em>duplexed</em> (that is, bidirectional), and ;TI"=so may use more than one native operating system stream.;T@o;;[ I"PMany of the examples in this section use the File class, the only standard ;TI"Lsubclass of IO. The two classes are closely associated. Like the File ;TI"Hclass, the Socket library subclasses from IO (such as TCPSocket or ;TI"UDPSocket).;T@o;;[I"NThe Kernel#open method can create an IO (or File) object for these types ;TI"of arguments:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o;;[I"FA plain string represents a filename suitable for the underlying ;TI"operating system.;T@o;;0;[o;;[ I"EA string starting with <code>"|"</code> indicates a subprocess. ;TI"CThe remainder of the string following the <code>"|"</code> is ;TI"Ainvoked as a process with appropriate input/output channels ;TI"connected to it.;T@o;;0;[o;;[I"BA string equal to <code>"|-"</code> will create another Ruby ;TI"instance as a subprocess.;T@o;;[I"PThe IO may be opened with different file modes (read-only, write-only) and ;TI"Jencodings for proper conversion. See IO.new for these options. See ;TI"LKernel#open for details of the various command formats described above.;T@o;;[I"HIO.popen, the Open3 library, or Process#spawn may also be used to ;TI"1communicate with subprocesses through an IO.;T@o;;[ I"DRuby will convert pathnames between different operating system ;TI"Econventions if possible. For instance, on a Windows system the ;TI"Cfilename <code>"/gumby/ruby/test.rb"</code> will be opened as ;TI"J<code>"\gumby\ruby\test.rb"</code>. When specifying a Windows-style ;TI"Cfilename in a Ruby string, remember to escape the backslashes:;T@o; ;[I" "C:\\gumby\\ruby\\test.rb" ;T;0o;;[I"@Our examples here will use the Unix-style forward slashes; ;TI"LFile::ALT_SEPARATOR can be used to get the platform-specific separator ;TI"character.;T@o;;[ I"OThe global constant ARGF (also accessible as <code>$<</code>) provides an ;TI"FIO-like stream which allows access to all files mentioned on the ;TI"Pcommand line (or STDIN if no files are mentioned). ARGF#path and its alias ;TI"OARGF#filename are provided to access the name of the file currently being ;TI" read.;T@S:RDoc::Markup::Heading: leveli: textI"io/console;T@o;;[I"HThe io/console extension provides methods for interacting with the ;TI"Kconsole. The console can be accessed from IO.console or the standard ;TI"#input/output/error IO objects.;T@o;;[I"5Requiring io/console adds the following methods:;T@o;;;;[o;;0;[o;;[I"IO::console;To;;0;[o;;[I"IO#raw;To;;0;[o;;[I"IO#raw!;To;;0;[o;;[I"IO#cooked;To;;0;[o;;[I"IO#cooked!;To;;0;[o;;[I" IO#getch;To;;0;[o;;[I" IO#echo=;To;;0;[o;;[I" IO#echo?;To;;0;[o;;[I"IO#noecho;To;;0;[o;;[I"IO#winsize;To;;0;[o;;[I"IO#winsize=;To;;0;[o;;[I"IO#iflush;To;;0;[o;;[I"IO#ioflush;To;;0;[o;;[I"IO#oflush;T@o;;[I" Example:;T@o; ;[I"require 'io/console' ;TI"%rows, columns = $stdout.winsize ;TI"<puts "Your screen is #{columns} wide and #{rows} tall" ;T;0S;;i;I"Example Files;T@o;;[I"JMany examples here use these filenames and their corresponding files:;T@o;;;;[ o;;0;[o;;[I"C<tt>t.txt</tt>: A text-only file that is assumed to exist via:;T@o; ;[I"text = <<~EOT ;TI" This is line one. ;TI" This is the second line. ;TI" This is the third line. ;TI" EOT ;TI"File.write('t.txt', text) ;T;0o;;0;[o;;[I"><tt>t.dat</tt>: A data file that is assumed to exist via:;T@o; ;[ I"-data = "\u9990\u9991\u9992\u9993\u9994" ;TI")f = File.open('t.dat', 'wb:UTF-16') ;TI"f.write(data) ;TI" f.close ;T;0o;;0;[o;;[I"O<tt>t.rus</tt>: A Russian-language text file that is assumed to exist via:;T@o; ;[I"0File.write('t.rus', "\u{442 435 441 442}") ;T;0o;;0;[o;;[I";<tt>t.tmp</tt>: A file that is assumed _not_ to exist.;T@S;;i;I" Modes;T@o;;[I"OA number of \IO method calls must or may specify a _mode_ for the stream; ;TI"Cthe mode determines how stream is to be accessible, including:;T@o;;;;[ o;;0;[o;;[I"FWhether the stream is to be read-only, write-only, or read-write.;To;;0;[o;;[I"BWhether the stream is positioned at its beginning or its end.;To;;0;[o;;[I";Whether the stream treats data as text-only or binary.;To;;0;[o;;[I")The external and internal encodings.;T@S;;i;I""Mode Specified as an \Integer;T@o;;[I"[When +mode+ is an integer it must be one or more (combined by bitwise OR (<tt>|</tt>) ;TI"-of the modes defined in File::Constants:;T@o;;;;[o;;0;[o;;[I"++File::RDONLY+: Open for reading only.;To;;0;[o;;[I"++File::WRONLY+: Open for writing only.;To;;0;[o;;[I"0+File::RDWR+: Open for reading and writing.;To;;0;[o;;[I"-+File::APPEND+: Open for appending only.;To;;0;[o;;[I"5+File::CREAT+: Create file if it does not exist.;To;;0;[o;;[I"T+File::EXCL+: Raise an exception if +File::CREAT+ is given and the file exists.;T@o;;[I"Examples:;T@o; ;[I"%File.new('t.txt', File::RDONLY) ;TI">File.new('t.tmp', File::RDWR | File::CREAT | File::EXCL) ;T;0o;;[I"XNote: Method IO#set_encoding does not allow the mode to be specified as an integer.;T@S;;i;I" Mode Specified As a \String;T@o;;[I"EWhen +mode+ is a string it must begin with one of the following:;T@o;;;;[o;;0;[o;;[I"B<tt>'r'</tt>: Read-only stream, positioned at the beginning; ;TI".the stream cannot be changed to writable.;To;;0;[o;;[I"C<tt>'w'</tt>: Write-only stream, positioned at the beginning; ;TI".the stream cannot be changed to readable.;To;;0;[o;;[I"=<tt>'a'</tt>: Write-only stream, positioned at the end; ;TI"%every write appends to the end; ;TI".the stream cannot be changed to readable.;To;;0;[o;;[I"C<tt>'r+'</tt>: Read-write stream, positioned at the beginning.;To;;0;[o;;[I"=<tt>'w+'</tt>: Read-write stream, positioned at the end.;To;;0;[o;;[I"=<tt>'a+'</tt>: Read-write stream, positioned at the end.;T@o;;[I"AFor a writable file stream (that is, any except read-only), ;TI"1the file is truncated to zero if it exists, ;TI")and is created if it does not exist.;T@o;;[I"Examples:;T@o; ;[I"File.open('t.txt', 'r') ;TI"File.open('t.tmp', 'w') ;T;0o;;[I"AEither of the following may be suffixed to any of the above:;T@o;;;;[o;;0;[o;;[I"W<tt>'t'</tt>: Text data; sets the default external encoding to +Encoding::UTF_8+; ;TI"9on Windows, enables conversion between EOL and CRLF.;To;;0;[o;;[I"^<tt>'b'</tt>: Binary data; sets the default external encoding to +Encoding::ASCII_8BIT+; ;TI"<on Windows, suppresses conversion between EOL and CRLF.;T@o;;[I";If neither is given, the stream defaults to text data.;T@o;;[I"Examples:;T@o; ;[I"File.open('t.txt', 'rt') ;TI"File.open('t.dat', 'rb') ;T;0o;;[I">The following may be suffixed to any writable mode above:;T@o;;;;[o;;0;[o;;[I":<tt>'x'</tt>: Creates the file if it does not exist; ;TI",raises an exception if the file exists.;T@o;;[I" Example:;T@o; ;[I"File.open('t.tmp', 'wx') ;T;0o;;[I"7Finally, the mode string may specify encodings -- ;TI"Neither external encoding only or both external and internal encodings -- ;TI"Bby appending one or both encoding names, separated by colons:;T@o; ;[I"!f = File.new('t.dat', 'rb') ;TI"5f.external_encoding # => #<Encoding:ASCII-8BIT> ;TI""f.internal_encoding # => nil ;TI"(f = File.new('t.dat', 'rb:UTF-16') ;TI"9f.external_encoding # => #<Encoding:UTF-16 (dummy)> ;TI""f.internal_encoding # => nil ;TI"/f = File.new('t.dat', 'rb:UTF-16:UTF-16') ;TI"9f.external_encoding # => #<Encoding:UTF-16 (dummy)> ;TI"1f.internal_encoding # => #<Encoding:UTF-16> ;T;0o;;[I"KThe numerous encoding names are available in array Encoding.name_list:;T@o; ;[I")Encoding.name_list.size # => 175 ;TI"IEncoding.name_list.take(3) # => ["ASCII-8BIT", "UTF-8", "US-ASCII"] ;T;0S;;i;I"Encodings;T@o;;[ I"(When the external encoding is set, ;TI".strings read are tagged by that encoding ;TI"=when reading, and strings written are converted to that ;TI"encoding when writing.;T@o;;[ I"8When both external and internal encodings are set, ;TI"Dstrings read are converted from external to internal encoding, ;TI"Kand strings written are converted from internal to external encoding. ;TI"JFor further details about transcoding input and output, see Encoding.;T@o;;[ I"OIf the external encoding is <tt>'BOM|UTF-8'</tt>, <tt>'BOM|UTF-16LE'</tt> ;TI"1or <tt>'BOM|UTF16-BE'</tt>, Ruby checks for ;TI"Na Unicode BOM in the input document to help determine the encoding. For ;TI"9UTF-16 encodings the file open mode must be binary. ;TI"XIf the BOM is found, it is stripped and the external encoding from the BOM is used.;T@o;;[I"BNote that the BOM-style encoding option is case insensitive, ;TI"#so 'bom|utf-8' is also valid.);T@S;;i;I"Open Options;T@o;;[I"BA number of \IO methods accept an optional parameter +opts+, ;TI"7which determines how a new stream is to be opened:;T@o;;;;[ o;;0;[o;;[I"+:mode+: Stream mode.;To;;0;[o;;[I")+:flags+: \Integer file open flags; ;TI"7If +mode+ is also given, the two are bitwise-ORed.;To;;0;[o;;[I"<+:external_encoding+: External encoding for the stream.;To;;0;[o;;[I"=+:internal_encoding+: Internal encoding for the stream. ;TI"B<tt>'-'</tt> is a synonym for the default internal encoding. ;TI"0If the value is +nil+ no conversion occurs.;To;;0;[o;;[I"X+:encoding+: Specifies external and internal encodings as <tt>'extern:intern'</tt>.;To;;0;[o;;[I"W+:textmode+: If a truthy value, specifies the mode as text-only, binary otherwise.;To;;0;[o;;[I"V+:binmode+: If a truthy value, specifies the mode as binary, text-only otherwise.;To;;0;[o;;[I"I+:autoclose+: If a truthy value, specifies that the +fd+ will close ;TI"7when the stream closes; otherwise it remains open.;T@o;;[I">Also available are the options offered in String#encode, ;TI"Ewhich may control conversion between external internal encoding.;T@S;;i;I"Getline Options;T@o;;[I"?A number of \IO methods accept optional keyword arguments ;TI"2that determine how a stream is to be treated:;T@o;;;;[o;;0;[o;;[I"K+:chomp+: If +true+, line separators are omitted; default is +false+.;T@S;;i;I" Position;T@o;;[I"NAn \IO stream has a _position_, which is the non-negative integer offset ;TI"F(in bytes) in the stream where the next read or write will occur.;T@o;;[I"=Note that a text stream may have multi-byte characters, ;TI"Tso a text stream whose position is +n+ (_bytes_) may not have +n+ _characters_ ;TI":preceding the current position -- there may be fewer.;T@o;;[I"*A new stream is initially positioned:;T@o;;;;[o;;0;[o;;[I"%At the beginning (position +0+) ;TI"Aif its mode is <tt>'r'</tt>, <tt>'w'</tt>, or <tt>'r+'</tt>.;To;;0;[o;;[I".At the end (position <tt>self.size</tt>) ;TI"Bif its mode is <tt>'a'</tt>, <tt>'w+'</tt>, or <tt>'a+'</tt>.;T@o;;[I"#Methods to query the position:;T@o;;;;[o;;0;[o;;[I"IIO#tell and its alias IO#pos return the position for an open stream.;To;;0;[o;;[I"LIO#eof? and its alias IO#eof return whether the position is at the end ;TI"of a readable stream.;T@o;;[I"8Reading from a stream usually changes its position:;T@o; ;[I"f = File.open('t.txt') ;TI"f.tell # => 0 ;TI"+f.readline # => "This is line one.\n" ;TI"f.tell # => 19 ;TI"2f.readline # => "This is the second line.\n" ;TI"f.tell # => 45 ;TI"f.eof? # => false ;TI"0f.readline # => "Here's the third line.\n" ;TI"f.eof? # => true ;T;0o;;[I"6Writing to a stream usually changes its position:;T@o; ;[I"!f = File.open('t.tmp', 'w') ;TI"f.tell # => 0 ;TI"f.write('foo') # => 3 ;TI"f.tell # => 3 ;TI"f.write('bar') # => 3 ;TI"f.tell # => 6 ;T;0o;;[I":Iterating over a stream usually changes its position:;T@o; ;[ I"f = File.open('t.txt') ;TI"f.each do |line| ;TI"9 p "position=#{f.pos} eof?=#{f.eof?} line=#{line}" ;TI" end ;T;0o;;[I"Output:;T@o; ;[I"7"position=19 eof?=false line=This is line one.\n" ;TI">"position=45 eof?=false line=This is the second line.\n" ;TI"<"position=70 eof?=true line=This is the third line.\n" ;T;0o;;[I"?The position may also be changed by certain other methods:;T@o;;;;[o;;0;[o;;[I"CIO#pos= and IO#seek change the position to a specified offset.;To;;0;[o;;[I"5IO#rewind changes the position to the beginning.;T@S;;i;I"Line Number;T@o;;[I"2A readable \IO stream has a _line_ _number_, ;TI"3which is the non-negative integer line number ;TI"2in the stream where the next read will occur.;T@o;;[I"3A new stream is initially has line number +0+.;T@o;;[I"/\Method IO#lineno returns the line number.;T@o;;[I"AReading lines from a stream usually changes its line number:;T@o; ;[I"!f = File.open('t.txt', 'r') ;TI"f.lineno # => 0 ;TI"+f.readline # => "This is line one.\n" ;TI"f.lineno # => 1 ;TI"2f.readline # => "This is the second line.\n" ;TI"f.lineno # => 2 ;TI"0f.readline # => "Here's the third line.\n" ;TI"f.lineno # => 3 ;TI"f.eof? # => true ;T;0o;;[I"FIterating over lines in a stream usually changes its line number:;T@o; ;[ I"f = File.open('t.txt') ;TI"f.each_line do |line| ;TI"9 p "position=#{f.pos} eof?=#{f.eof?} line=#{line}" ;TI" end ;T;0o;;[I"Output:;T@o; ;[I"7"position=19 eof?=false line=This is line one.\n" ;TI">"position=45 eof?=false line=This is the second line.\n" ;TI"<"position=70 eof?=true line=This is the third line.\n" ;T;0S;;i;I"What's Here;T@o;;[I")First, what's elsewhere. \Class \IO:;T@o;;;;[o;;0;[o;;[I"PInherits from {class Object}[Object.html#class-Object-label-What-27s+Here].;To;;0;[o;;[I"ZIncludes {module Enumerable}[Enumerable.html#module-Enumerable-label-What-27s+Here], ;TI"1which provides dozens of additional methods.;T@o;;[I":Here, class \IO provides methods that are useful for:;T@o;;;;[o;;0;[o;;[I"){Creating}[#class-IO-label-Creating];To;;0;[o;;[I"'{Reading}[#class-IO-label-Reading];To;;0;[o;;[I"'{Writing}[#class-IO-label-Writing];To;;0;[o;;[I"/{Positioning}[#class-IO-label-Positioning];To;;0;[o;;[I"+{Iterating}[#class-IO-label-Iterating];To;;0;[o;;[I"){Settings}[#class-IO-label-Settings];To;;0;[o;;[I"){Querying}[#class-IO-label-Querying];To;;0;[o;;[I"+{Buffering}[#class-IO-label-Buffering];To;;0;[o;;[I"9{Low-Level Access}[#class-IO-label-Low-Level+Access];To;;0;[o;;[I"#{Other}[#class-IO-label-Other];T@S;;i;I" Creating;T@o;;;;[ o;;0;[o;;: NOTE;[o;;[I" ::new (aliased as ::for_fd);T;[o;;[I"8Creates and returns a new \IO object for the given ;TI"integer file descriptor.;To;;0;[o;;;;[o;;[I"::open;T;[o;;[I"Creates a new \IO object.;To;;0;[o;;;;[o;;[I"::pipe;T;[o;;[I"?Creates a connected pair of reader and writer \IO objects.;To;;0;[o;;;;[o;;[I"::popen;T;[o;;[I"9Creates an \IO object to interact with a subprocess.;To;;0;[o;;;;[o;;[I" ::select;T;[o;;[I"=Selects which given \IO instances are ready for reading,;To;;[I")writing, or have pending exceptions.;T@S;;i;I"Reading;T@o;;;;[o;;0;[o;;;;[o;;[I"::binread;T;[o;;[I";Returns a binary string with all or a subset of bytes ;TI"from the given file.;To;;0;[o;;;;[o;;[I"::read;T;[o;;[I"HReturns a string with all or a subset of bytes from the given file.;To;;0;[o;;;;[o;;[I"::readlines;T;[o;;[I"JReturns an array of strings, which are the lines from the given file.;To;;0;[o;;;;[o;;[I" #getbyte;T;[o;;[I"@Returns the next 8-bit byte read from +self+ as an integer.;To;;0;[o;;;;[o;;[I" #getc;T;[o;;[I"=Returns the next character read from +self+ as a string.;To;;0;[o;;;;[o;;[I" #gets;T;[o;;[I"'Returns the line read from +self+.;To;;0;[o;;;;[o;;[I"#pread;T;[o;;[I"9Returns all or the next _n_ bytes read from +self+, ;TI"(not updating the receiver's offset.;To;;0;[o;;;;[o;;[I" #read;T;[o;;[I"BReturns all remaining or the next _n_ bytes read from +self+ ;TI"for a given _n_.;To;;0;[o;;;;[o;;[I"#read_nonblock;T;[o;;[I":the next _n_ bytes read from +self+ for a given _n_, ;TI"in non-block mode.;To;;0;[o;;;;[o;;[I"#readbyte;T;[o;;[I"-Returns the next byte read from +self+; ;TI">same as #getbyte, but raises an exception on end-of-file.;To;;0;[o;;;;[o;;[I"#readchar;T;[o;;[I"2Returns the next character read from +self+; ;TI";same as #getc, but raises an exception on end-of-file.;To;;0;[o;;;;[o;;[I"#readline;T;[o;;[I"-Returns the next line read from +self+; ;TI">same as #getline, but raises an exception of end-of-file.;To;;0;[o;;;;[o;;[I"#readlines;T;[o;;[I"9Returns an array of all lines read read from +self+.;To;;0;[o;;;;[o;;[I"#readpartial;T;[o;;[I"9Returns up to the given number of bytes from +self+.;T@S;;i;I"Writing;T@o;;;;[o;;0;[o;;;;[o;;[I"::binwrite;T;[o;;[I"@Writes the given string to the file at the given filepath, ;TI"in binary mode.;To;;0;[o;;;;[o;;[I"::write;T;[o;;[I"'Writes the given string to +self+.;To;;0;[o;;;;[o;;[I"{::<<}[#method-i-3C-3C];T;[o;;[I"(Appends the given string to +self+.;To;;0;[o;;;;[o;;[I"#print;T;[o;;[I"6Prints last read line or given objects to +self+.;To;;0;[o;;;;[o;;[I"#printf;T;[o;;[I"CWrites to +self+ based on the given format string and objects.;To;;0;[o;;;;[o;;[I" #putc;T;[o;;[I""Writes a character to +self+.;To;;0;[o;;;;[o;;[I" #puts;T;[o;;[I"BWrites lines to +self+, making sure line ends with a newline.;To;;0;[o;;;;[o;;[I"#pwrite;T;[o;;[I"2Writes the given string at the given offset, ;TI"(not updating the receiver's offset.;To;;0;[o;;;;[o;;[I"#write;T;[o;;[I"0Writes one or more given strings to +self+.;To;;0;[o;;;;[o;;[I"#write_nonblock;T;[o;;[I"EWrites one or more given strings to +self+ in non-blocking mode.;T@S;;i;I"Positioning;T@o;;;;[o;;0;[o;;;;[o;;[I"#lineno;T;[o;;[I"/Returns the current line number in +self+.;To;;0;[o;;;;[o;;[I" #lineno=;T;[o;;[I"$Sets the line number is +self+.;To;;0;[o;;;;[o;;[I"#pos (aliased as #tell);T;[o;;[I"/Returns the current byte offset in +self+.;To;;0;[o;;;;[o;;[I" #pos=;T;[o;;[I"$Sets the byte offset in +self+.;To;;0;[o;;;;[o;;[I"#reopen;T;[o;;[I";Reassociates +self+ with a new or existing \IO stream.;To;;0;[o;;;;[o;;[I"#rewind;T;[o;;[I"0Positions +self+ to the beginning of input.;To;;0;[o;;;;[o;;[I" #seek;T;[o;;[I";Sets the offset for +self+ relative to given position.;T@S;;i;I"Iterating;T@o;;;;[ o;;0;[o;;;;[o;;[I"::foreach;T;[o;;[I"1Yields each line of given file to the block.;To;;0;[o;;;;[o;;[I""#each (aliased as #each_line);T;[o;;[I"Calls the given block ;TI")with each successive line in +self+.;To;;0;[o;;;;[o;;[I"#each_byte;T;[o;;[I"?Calls the given block with each successive byte in +self+ ;TI"as an integer.;To;;0;[o;;;;[o;;[I"#each_char;T;[o;;[I"DCalls the given block with each successive character in +self+ ;TI"as a string.;To;;0;[o;;;;[o;;[I"#each_codepoint;T;[o;;[I"DCalls the given block with each successive codepoint in +self+ ;TI"as an integer.;T@S;;i;I" Settings;T@o;;;;[o;;0;[o;;;;[o;;[I"#autoclose=;T;[o;;[I"%Sets whether +self+ auto-closes.;To;;0;[o;;;;[o;;[I" #binmode;T;[o;;[I" Sets +self+ to binary mode.;To;;0;[o;;;;[o;;[I"#close;T;[o;;[I"Closes +self+.;To;;0;[o;;;;[o;;[I"#close_on_exec=;T;[o;;[I"!Sets the close-on-exec flag.;To;;0;[o;;;;[o;;[I"#close_read;T;[o;;[I"Closes +self+ for reading.;To;;0;[o;;;;[o;;[I"#close_write;T;[o;;[I"Closes +self+ for writing.;To;;0;[o;;;;[o;;[I"#set_encoding;T;[o;;[I""Sets the encoding for +self+.;To;;0;[o;;;;[o;;[I"#set_encoding_by_bom;T;[o;;[I"0Sets the encoding for +self+, based on its ;TI"Unicode byte-order-mark.;To;;0;[o;;;;[o;;[I"#sync=;T;[o;;[I"+Sets the sync-mode to the given value.;T@S;;i;I" Querying;T@o;;;;[o;;0;[o;;;;[o;;[I"#autoclose?;T;[o;;[I"(Returns whether +self+ auto-closes.;To;;0;[o;;;;[o;;[I"#binmode?;T;[o;;[I".Returns whether +self+ is in binary mode.;To;;0;[o;;;;[o;;[I"#close_on_exec?;T;[o;;[I"/Returns the close-on-exec flag for +self+.;To;;0;[o;;;;[o;;[I" #closed?;T;[o;;[I"&Returns whether +self+ is closed.;To;;0;[o;;;;[o;;[I"#eof? (aliased as #eof);T;[o;;[I".Returns whether +self+ is at end-of-file.;To;;0;[o;;;;[o;;[I"#external_encoding;T;[o;;[I"5Returns the external encoding object for +self+.;To;;0;[o;;;;[o;;[I"#fileno (aliased as #to_i);T;[o;;[I"3Returns the integer file descriptor for +self+;To;;0;[o;;;;[o;;[I"#internal_encoding;T;[o;;[I"5Returns the internal encoding object for +self+.;To;;0;[o;;;;[o;;[I" #pid;T;[o;;[I"GReturns the process ID of a child process associated with +self+, ;TI"&if +self+ was created by ::popen.;To;;0;[o;;;;[o;;[I" #stat;T;[o;;[I"LReturns the File::Stat object containing status information for +self+.;To;;0;[o;;;;[o;;[I" #sync;T;[o;;[I",Returns whether +self+ is in sync-mode.;To;;0;[o;;;;[o;;[I"#tty (aliased as #isatty);T;[o;;[I"*Returns whether +self+ is a terminal.;T@S;;i;I"Buffering;T@o;;;;[ o;;0;[o;;;;[o;;[I"#fdatasync;T;[o;;[I"<Immediately writes all buffered data in +self+ to disk.;To;;0;[o;;;;[o;;[I"#flush;T;[o;;[I"?Flushes any buffered data within +self+ to the underlying ;TI"operating system.;To;;0;[o;;;;[o;;[I"#fsync;T;[o;;[I"KImmediately writes all buffered data and attributes in +self+ to disk.;To;;0;[o;;;;[o;;[I"#ungetbyte;T;[o;;[I"BPrepends buffer for +self+ with given integer byte or string.;To;;0;[o;;;;[o;;[I"#ungetc;T;[o;;[I"2Prepends buffer for +self+ with given string.;T@S;;i;I"Low-Level Access;T@o;;;;[o;;0;[o;;;;[o;;[I"::sysopen;T;[o;;[I"'Opens the file given by its path, ;TI"+returning the integer file descriptor.;To;;0;[o;;;;[o;;[I"#advise;T;[o;;[I"JAnnounces the intention to access data from +self+ in a specific way.;To;;0;[o;;;;[o;;[I"#fcntl;T;[o;;[I"6Passes a low-level command to the file specified ;TI""by the given file descriptor.;To;;0;[o;;;;[o;;[I"#ioctl;T;[o;;[I"8Passes a low-level command to the device specified ;TI""by the given file descriptor.;To;;0;[o;;;;[o;;[I" #sysread;T;[o;;[I"LReturns up to the next _n_ bytes read from self using a low-level read.;To;;0;[o;;;;[o;;[I" #sysseek;T;[o;;[I" Sets the offset for +self+.;To;;0;[o;;;;[o;;[I"#syswrite;T;[o;;[I"?Writes the given string to +self+ using a low-level write.;T@S;;i;I" Other;T@o;;;;[o;;0;[o;;;;[o;;[I"::copy_stream;T;[o;;[I"1Copies data from a source to a destination, ;TI"7each of which is a filepath or an \IO-like object.;To;;0;[o;;;;[o;;[I"::try_convert;T;[o;;[I"8Returns a new \IO object resulting from converting ;TI"the given object.;To;;0;[o;;;;[o;;[I" #inspect;T;[o;;[I"1Returns the string representation of +self+.;T; I" io.c;T; 0o;;[ ; I" io.rb;T; 0; 0; 0[ [U:RDoc::Constant[i I" READABLE;TI"IO::READABLE;T:public0o;;[ ; @r; 0@r@cRDoc::NormalClass0U;[i I" WRITABLE;TI"IO::WRITABLE;T;0o;;[ ; @r; 0@r@@~0U;[i I" PRIORITY;TI"IO::PRIORITY;T;0o;;[ ; @r; 0@r@@~0U;[i I"EWOULDBLOCKWaitReadable;TI" IO::EWOULDBLOCKWaitReadable;T;0o;;[o;;[I"EAGAINWaitReadable;T@; @r; 0@r@@~0U;[i I"EWOULDBLOCKWaitWritable;TI" IO::EWOULDBLOCKWaitWritable;T;0o;;[o;;[I"EAGAINWaitWritable;T@; @r; 0@r@@~0U;[i I" SEEK_SET;TI"IO::SEEK_SET;T;0o;;[o;;[I"(Set I/O position from the beginning;T@; @r; 0@r@@~0U;[i I" SEEK_CUR;TI"IO::SEEK_CUR;T;0o;;[o;;[I"/Set I/O position from the current position;T@; @r; 0@r@@~0U;[i I" SEEK_END;TI"IO::SEEK_END;T;0o;;[o;;[I""Set I/O position from the end;T@; @r; 0@r@@~0U;[i I"SEEK_DATA;TI"IO::SEEK_DATA;T;0o;;[o;;[I":Set I/O position to the next location containing data;T@; @r; 0@r@@~0U;[i I"SEEK_HOLE;TI"IO::SEEK_HOLE;T;0o;;[o;;[I"&Set I/O position to the next hole;T@; @r; 0@r@@~0[[I"File::File::Constants;To;;[ ; I"file.c;T; 0I"file.c;T[I"Enumerable;To;;[ ; @r; 0I" io.c;T[[I" class;T[[;[ [:protected[ [:private[[I"binread;T@�[I" binwrite;T@�[I"console;TI"ext/io/console/console.c;T[I"console_size;TI"'ext/io/console/lib/console/size.rb;T[I"copy_stream;T@�[I"default_console_size;T@�[I"for_fd;T@�[I"foreach;T@�[I"new;T@�[I" open;T@�[I" pipe;T@�[I" popen;T@�[I" read;T@�[I"readlines;T@�[I"select;T@�[I"sysopen;T@�[I"try_convert;T@�[I" write;T@�[I" instance;T[[;[ [;[ [;[u[I"<<;T@�[I"advise;T@�[I"autoclose=;T@�[I"autoclose?;T@�[I" beep;T@�[I"binmode;T@�[I" binmode?;T@�[I"check_winsize_changed;T@�[I"clear_screen;T@�[I" close;T@�[I"close_on_exec=;T@�[I"close_on_exec?;T@�[I"close_read;T@�[I"close_write;T@�[I"closed?;T@�[I"console_mode;T@�[I"console_mode=;T@�[I"cooked;T@�[I"cooked!;T@�[I"cursor;T@�[I"cursor=;T@�[I"cursor_down;T@�[I"cursor_left;T@�[I"cursor_right;T@�[I"cursor_up;T@�[I" each;T@�[I"each_byte;T@�[I"each_char;T@�[I"each_codepoint;T@�[I"each_line;T@�[I" echo=;T@�[I" echo?;T@�[I"eof;T@�[I" eof?;T@�[I"erase_line;T@�[I"erase_screen;T@�[I"expect;TI"ext/pty/lib/expect.rb;T[I"external_encoding;T@�[I" fcntl;T@�[I"fdatasync;T@�[I"fileno;T@�[I" flush;T@�[I" fsync;T@�[I"getbyte;T@�[I" getc;T@�[I" getch;T@�[I"getpass;T@�[I" gets;T@�[I" goto;T@�[I"goto_column;T@�[I"iflush;T@�[I"inspect;T@�[I"internal_encoding;T@�[I" ioctl;T@�[I"ioflush;T@�[I"isatty;T@�[I"lineno;T@�[I"lineno=;T@�[I"noecho;T@�[I" nonblock;TI"ext/io/nonblock/nonblock.c;T[I"nonblock=;T@�[I"nonblock?;T@�[I" nread;TI"ext/io/wait/wait.c;T[I"oflush;T@�[I" pathconf;TI"ext/etc/etc.c;T[I"pid;T@�[I"pos;T@�[I" pos=;T@�[I" pread;T@�[I" pressed?;T@�[I" print;T@�[I"printf;T@�[I" putc;T@�[I" puts;T@�[I"pwrite;T@�[I"raw;T@�[I" raw!;T@�[I" read;T@�[I"read_nonblock;TI" io.rb;T[I" readbyte;T@�[I" readchar;T@�[I" readline;T@�[I"readlines;T@�[I"readpartial;T@�[I"ready?;T@�[I"reopen;T@�[I"rewind;T@�[I"scroll_backward;T@�[I"scroll_forward;T@�[I" seek;T@�[I"set_encoding;T@�[I"set_encoding_by_bom;T@�[I" stat;T@�[I" sync;T@�[I" sync=;T@�[I"sysread;T@�[I"sysseek;T@�[I" syswrite;T@�[I" tell;T@�[I" to_i;T@�[I" to_io;T@�[I" tty?;T@�[I"ungetbyte;T@�[I"ungetc;T@�[I" wait;T@�[I"wait_priority;T@�[I"wait_readable;T@�[I"wait_writable;T@�[I"winsize;T@�[I" winsize=;T@�[I" write;T@�[I"write_nonblock;T@�[ [U:RDoc::Context::Section[i 0o;;[ ; 0; 0[I"ext/etc/etc.c;T@ I"ext/io/nonblock/nonblock.c;TI"ext/io/wait/wait.c;TI"ext/pty/lib/expect.rb;TI"file.c;TI" io.c;TI" io.rb;TI"lib/csv.rb;TI"lib/csv/writer.rb;TI"'lib/rubygems/package/tar_reader.rb;TI"lib/rubygems/resolver.rb;TI"lib/rubygems/util.rb;T@ucRDoc::TopLevel