Class: FAFuse::Root

Inherits:
Object
  • Object
show all
Defined in:
lib/fafuse/root.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Root

Returns a new instance of Root.



9
10
11
# File 'lib/fafuse/root.rb', line 9

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



3
4
5
# File 'lib/fafuse/root.rb', line 3

def path
  @path
end

Class Method Details

.match?(path) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/fafuse/root.rb', line 5

def self.match?(path)
  path.match(/^\/$/)
end

Instance Method Details

#contentObject

Raises:

  • (Errno::EACCES)


27
28
29
# File 'lib/fafuse/root.rb', line 27

def content
  raise Errno::EACCES.new(path)
end

#statObject



17
18
19
20
21
22
23
24
25
# File 'lib/fafuse/root.rb', line 17

def stat
  RFuse::Stat.directory(0111, {
                          :uid => 0,
                          :gid => 0,
                          :atime => Time.now,
                          :mtime => Time.now,
                          :size => 0
                        })
end

#valid?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/fafuse/root.rb', line 13

def valid?
  true
end