Class: FAFuse::Root
- Inherits:
-
Object
- Object
- FAFuse::Root
- Defined in:
- lib/fafuse/root.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(path) ⇒ Root
constructor
A new instance of Root.
- #stat ⇒ Object
- #valid? ⇒ Boolean
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
#path ⇒ Object
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
5 6 7 |
# File 'lib/fafuse/root.rb', line 5 def self.match?(path) path.match(/^\/$/) end |
Instance Method Details
#content ⇒ Object
27 28 29 |
# File 'lib/fafuse/root.rb', line 27 def content raise Errno::EACCES.new(path) end |
#stat ⇒ Object
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
13 14 15 |
# File 'lib/fafuse/root.rb', line 13 def valid? true end |