Class: Rex::Post::Meterpreter::Extensions::Stdapi::Fs::IO
- Defined in:
- lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb
Overview
The IO class acts as a base class for things that would normally implement the IO interface. The methods it implements are for general operations that are common to all channels, such as read, write, and close.
Direct Known Subclasses
Instance Method Summary collapse
-
#close ⇒ Object
Closes the channel.
-
#sysread(length = nil) ⇒ Object
(also: #read)
Read the specified number of bytes from the channel.
-
#syswrite(buf) ⇒ Object
(also: #write)
Writes the supplied buffer to the channel.
Methods inherited from IO
#binmode, #close_read, #close_write, #closed?, #each, #each_byte, #each_line, #eof, #eof?, #fcntl, #flush, #fsync, #getc, #gets, #ioctl, #isatty, #lineno, #pos, #print, #printf, #putc, #puts, #readchar, #readline, #readlines, #rewind, #seek, #stat, #sync, #sysseek, #tell, #tty?, #ungetc
Instance Method Details
#close ⇒ Object
Closes the channel.
43 44 45 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb', line 43 def close self.filed.close end |
#sysread(length = nil) ⇒ Object Also known as: read
Read the specified number of bytes from the channel.
25 26 27 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb', line 25 def sysread(length = nil) self.filed.read(length) end |
#syswrite(buf) ⇒ Object Also known as: write
Writes the supplied buffer to the channel.
34 35 36 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb', line 34 def syswrite(buf) self.filed.write(buf) end |