Class: RIO::Stream::IOBase

Inherits:
Base show all
Includes:
Ops::Path::Str, Ops::Stream::Manip, Ops::Stream::Status
Defined in:
lib/rio/stream.rb

Direct Known Subclasses

InOut, Input, Output

Constant Summary

Constants inherited from Base

Base::KEEPSYM

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Ops::Stream::Manip

#binmode, #flush, #fsync, #isatty, #pid, #seek, #to_io, #tty?

Methods included from Ops::Stream::Status

#closed?, #eof?, #open?, #stat

Methods included from Ops::Path::ExistOrNot

#symlink

Methods included from Ops::Path::URI

#abs, #abs?, #base, #merge, #rel, #route_from, #route_to, #setbase

Methods included from Ops::Path::Create

#/, #cleanpath, #cwd, #getwd, #join, #join!, #rootpath

Methods included from Ops::Path::Query

#+, #basename, #dirname, #expand_path, #extname, #filename, #gsub, #splitpath, #sub

Methods included from Ops::Path::Status

#atime, #ctime, #executable?, #executable_real?, #fnmatch, #fnmatch?, #ftype, #grpowned?, #mtime, #owned?, #readable?, #readable_real?, #root?, #setgid?, #setuid?, #size, #size?, #stat, #sticky?, #writable?, #writable_real?, #zero?

Methods included from Ops::Path::Test

#blockdev?, #chardev?, #closed?, #directory?, #exist?, #file?, #open?, #pipe?, #socket?, #symlink?

Class Method Details

.copier(src, dst) ⇒ Object



96
97
98
# File 'lib/rio/stream.rb', line 96

def self.copier(src,dst)
  RIO::Copy::Strategy::Stream.instance.copier(src,dst)
end

Instance Method Details

#add_filter(mod) ⇒ Object



81
82
83
84
85
# File 'lib/rio/stream.rb', line 81

def add_filter(mod)
  unless ioh.kind_of?(mod)
    ioh.extend(mod)
  end
end

#base_stateObject



73
# File 'lib/rio/stream.rb', line 73

def base_state() 'Stream::Close' end

#check?Boolean

Returns:

  • (Boolean)


68
# File 'lib/rio/stream.rb', line 68

def check?() open? end

#rectype_modObject

end



89
90
91
92
93
94
95
# File 'lib/rio/stream.rb', line 89

def rectype_mod
  case cx['stream_rectype']
  when 'lines' then RIO::RecType::Lines
  when 'bytes' then RIO::RecType::Bytes
  else RIO::RecType::Lines
  end
end

#resetObject



74
75
76
# File 'lib/rio/stream.rb', line 74

def reset()
  self.close.softreset()
end

#setupObject



77
78
79
80
# File 'lib/rio/stream.rb', line 77

def setup
  ioh.sync = sync? if cx.has_key?('sync')
  self
end

#when_missing(sym, *args) ⇒ Object



69
70
71
72
# File 'lib/rio/stream.rb', line 69

def when_missing(sym,*args) 
  #p callstr('when_missing',sym,*args)
  retryreset() 
end