Class: RIO::FS::Native

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Util

#cp_r, #mkpath, #mv, #rm, #rmtree, #touch

Methods included from Test

#blockdev?, #chardev?, #dir?, #directory?, #executable?, #executable_real?, #exist?, #file?, #grpowned?, #owned?, #pipe?, #readable?, #readable_real?, #setgid?, #setuid?, #size, #size?, #socket?, #sticky?, #symlink?, #writable?, #writable_real?, #zero?

Methods included from Path

#mountpoint?, #realpath, #root?

Methods included from Dir

#chdir, #entries, #foreach, #getwd, #glob, #mkdir, #pwd, #rmdir

Methods included from File

#atime, #chmod, #chown, #ctime, #expand_path, #ftype, #lstat, #mtime, #readlink, #stat, #symlink, #truncate

Methods included from Str

#basename, #cleanpath, #dirname, #extname, #fnmatch?, #join

Constructor Details

#initialize(*args) ⇒ Native

Returns a new instance of Native.



45
46
47
48
49
50
51
52
53
# File 'lib/rio/fs/native.rb', line 45

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.



44
45
46
# File 'lib/rio/fs/native.rb', line 44

def dir
  @dir
end

#fileObject (readonly)

Returns the value of attribute file.



44
45
46
# File 'lib/rio/fs/native.rb', line 44

def file
  @file
end

Class Method Details

.create(*args) ⇒ Object



55
56
57
# File 'lib/rio/fs/native.rb', line 55

def self.create(*args)
  instance(*args)
end

Instance Method Details

#cwdObject



62
63
64
# File 'lib/rio/fs/native.rb', line 62

def cwd()
  self.getwd()
end

#rootObject



58
59
60
61
# File 'lib/rio/fs/native.rb', line 58

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