Class: VirtFS::NativeFS::Thin::Dir
- Inherits:
-
Object
- Object
- VirtFS::NativeFS::Thin::Dir
- Defined in:
- lib/virtfs/nativefs/thin/dir.rb
Instance Attribute Summary collapse
-
#dir_obj ⇒ Object
readonly
Returns the value of attribute dir_obj.
-
#fs ⇒ Object
readonly
Returns the value of attribute fs.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(fs, instance_handle, hash_args) ⇒ Dir
constructor
A new instance of Dir.
-
#read(pos) ⇒ Object
returns file_name and new position.
Constructor Details
#initialize(fs, instance_handle, hash_args) ⇒ Dir
Returns a new instance of Dir.
6 7 8 9 10 11 12 |
# File 'lib/virtfs/nativefs/thin/dir.rb', line 6 def initialize(fs, instance_handle, hash_args) @fs = fs @dir_obj = instance_handle @hash_args = hash_args @cache = nil end |
Instance Attribute Details
#dir_obj ⇒ Object (readonly)
Returns the value of attribute dir_obj.
4 5 6 |
# File 'lib/virtfs/nativefs/thin/dir.rb', line 4 def dir_obj @dir_obj end |
#fs ⇒ Object (readonly)
Returns the value of attribute fs.
4 5 6 |
# File 'lib/virtfs/nativefs/thin/dir.rb', line 4 def fs @fs end |
Instance Method Details
#close ⇒ Object
14 15 16 |
# File 'lib/virtfs/nativefs/thin/dir.rb', line 14 def close @dir_obj.close end |
#read(pos) ⇒ Object
returns file_name and new position.
19 20 21 |
# File 'lib/virtfs/nativefs/thin/dir.rb', line 19 def read(pos) return cache[pos], pos + 1 end |