Class: RIO::FS::Local

Inherits:
Object show all
Includes:
Fwd::Dir, Fwd::File, Fwd::Path, Fwd::Str, Fwd::Test, Fwd::Util
Defined in:
lib/rio/fs.rb

Constant Summary collapse

FS_ENCODING =
Dir.pwd.encoding

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RIO::Fwd

#fwd, #fwd_reader, #fwd_readers, #fwd_writer, #fwd_writers

Constructor Details

#initialize(*args) ⇒ Local

Returns a new instance of Local.



123
124
125
126
127
128
129
130
131
# File 'lib/rio/fs.rb', line 123

def initialize(*args)
  @file = ::File
  @test = ::FileTest
  @dir  = ::Dir
  require 'pathname'
  @path = ::Pathname
  require 'fileutils'
  @util = ::FileUtils
end

Instance Attribute Details

#dirObject (readonly)

Returns the value of attribute dir.



122
123
124
# File 'lib/rio/fs.rb', line 122

def dir
  @dir
end

#fileObject (readonly)

Returns the value of attribute file.



122
123
124
# File 'lib/rio/fs.rb', line 122

def file
  @file
end

Instance Method Details

#encodingObject



132
133
134
# File 'lib/rio/fs.rb', line 132

def encoding
  FS_ENCODING
end

#rootObject



135
136
137
138
# File 'lib/rio/fs.rb', line 135

def root()
  require 'rio/local'
  ::RIO::Local::ROOT_DIR        
end