to_i

to_i() Instance Public methods Alias for: fileno

tell

ios.tell â integer Instance Public methods Returns the current offset (in bytes) of ios. f = File.new("testfile") f.pos #=> 0 f.gets #=> "This is line one\n" f.pos #=> 17

syswrite

ios.syswrite(string) â integer Instance Public methods Writes the given string to ios using a low-level write. Returns the number of bytes written. Do not mix with other methods that write to ios or you may get unpredictable results. Raises SystemCallError on error. f = File.new("out", "w") f.syswrite("ABCDEF") #=> 6

sysseek

ios.sysseek(offset, whence=IO::SEEK_SET) â integer Instance Public methods Seeks to a given offset in the stream according to the value of whence (see IO#seek for values of whence). Returns the new offset into the file. f = File.new("testfile") f.sysseek(-13, IO::SEEK_END) #=> 53 f.sysread(10) #=> "And so on."

sysread

ios.sysread(maxlen[, outbuf]) â string Instance Public methods Reads maxlen 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. If the optional outbuf argument is present, it must reference a String, which will receive the data. The outbuf will contain only the received data after the method call even if it is not empty at the beginning. Raises SystemCallError on error and EO

sync=

ios.sync = boolean â boolean Instance Public methods Sets the âsync mode'' to true or false. When sync mode is true, all output is immediately flushed to the underlying operating system and is not buffered internally. Returns the new state. See also IO#fsync. f = File.new("testfile") f.sync = true (produces no output)

sync

ios.sync â true or false Instance Public methods Returns the current âsync mode'' of ios. When sync mode is true, all output is immediately flushed to the underlying operating system and is not buffered by Ruby internally. See also IO#fsync. f = File.new("testfile") f.sync #=> false

stat

ios.stat â stat Instance Public methods Returns status information for ios as an object of type File::Stat. f = File.new("testfile") s = f.stat "%o" % s.mode #=> "100644" s.blksize #=> 4096 s.atime #=> Wed Apr 09 08:53:54 CDT 2003

set_encoding

io.set_encoding(ext_enc) â ioio.set_encoding("ext_enc:int_enc") â ioio.set_encoding(ext_enc, int_enc) â ioio.set_encoding("ext_enc:int_enc", opt) â ioio.set_encoding(ext_enc, int_enc, opt) â io Instance Public methods If single argument is specified, read string from io is tagged with the encoding specified. If encoding is a colon separated two encoding names âA:Bâ, the read string is converted from encoding A (external encoding) to encoding B (internal

seek

ios.seek(amount, whence=IO::SEEK_SET) â 0 Instance Public methods Seeks to a given offset anInteger in the stream according to the value of whence: IO::SEEK_CUR | Seeks to _amount_ plus current position --------------+---------------------------------------------------- IO::SEEK_END | Seeks to _amount_ plus end of stream (you probably | want a negative value for _amount_) --------------+---------------------------------------------------- IO::SEEK_SET | Seeks to