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.



34
35
36
37
38
39
40
41
42
# File 'lib/rio/fs/native.rb', line 34

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.



33
34
35
# File 'lib/rio/fs/native.rb', line 33

def dir
  @dir
end

#fileObject (readonly)

Returns the value of attribute file.



33
34
35
# File 'lib/rio/fs/native.rb', line 33

def file
  @file
end

Class Method Details

.create(*args) ⇒ Object



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

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

Instance Method Details

#cwdObject



51
52
53
# File 'lib/rio/fs/native.rb', line 51

def cwd()
  self.getwd()
end

#rootObject



47
48
49
50
# File 'lib/rio/fs/native.rb', line 47

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