close

ios.close â nil Instance Public methods Closes ios and flushes any pending writes to the operating system. The stream is unavailable for any further data operations; an IOError is raised if such an attempt is made. I/O streams are automatically closed when they are claimed by the garbage collector. If ios is opened by IO.popen, close sets $?.

chars

chars() Instance Public methods This is a deprecated alias for each_char.

bytes

bytes() Instance Public methods This is a deprecated alias for each_byte.

binmode?

ios.binmode? â true or false Instance Public methods Returns true if ios is binmode.

binmode

ios.binmode â ios Instance Public methods Puts ios into binary mode. Once a stream is in binary mode, it cannot be reset to nonbinary mode. newline conversion disabled encoding conversion disabled content is treated as ASCII-8BIT

autoclose?

ios.autoclose? â true or false Instance Public methods Returns true if the underlying file descriptor of ios will be closed automatically at its finalization, otherwise false.

autoclose=

io.autoclose = bool â true or false Instance Public methods Sets auto-close flag. f = open("/dev/null") IO.for_fd(f.fileno) # ... f.gets # may cause IOError f = open("/dev/null") IO.for_fd(f.fileno).autoclose = true # ... f.gets # won't cause IOError

advise

ios.advise(advice, offset=0, len=0) â nil Instance Public methods Announce an intention to access data from the current file in a specific pattern. On platforms that do not support the <em>posix_fadvise(2)</em> system call, this method is a no-op. advice is one of the following symbols: * :normal - No advice to give; the default assumption for an open file. * :sequential - The data will be accessed sequentially: with lower offsets read before higher ones. * :random

&lt;&lt;

ios Instance Public methods String OutputâWrites obj to ios. obj will be converted to a string using to_s. $stdout << "Hello " << "world!\n" produces: Hello world!

write

IO.write(name, string, [offset] ) => fixnumIO.write(name, string, [offset], open_args ) => fixnum Class Public methods Opens the file, optionally seeks to the given offset, writes string, then returns the length written. write ensures the file is closed before returning. If offset is not given, the file is truncated. Otherwise, it is not truncated. If the last argument is a hash, it specifies option for internal open(). The key would be the following. open_args: is ex