Module: VirtFS::NativeFS::Thick::DirClassMethods
- Included in:
- VirtFS::NativeFS::Thick
- Defined in:
- lib/virtfs/nativefs/thick/dir_class_methods.rb
Instance Method Summary collapse
- #dir_delete(p) ⇒ Object
- #dir_entries(p) ⇒ Object
- #dir_exist?(p) ⇒ Boolean
- #dir_foreach(p, &block) ⇒ Object
- #dir_mkdir(p, permissions) ⇒ Object
- #dir_new(fs_rel_path, hash_args, _open_path, cwd) ⇒ Object
Instance Method Details
#dir_delete(p) ⇒ Object
7 8 9 |
# File 'lib/virtfs/nativefs/thick/dir_class_methods.rb', line 7 def dir_delete(p) VfsRealDir.delete(apply_root(p)) end |
#dir_entries(p) ⇒ Object
11 12 13 |
# File 'lib/virtfs/nativefs/thick/dir_class_methods.rb', line 11 def dir_entries(p) VfsRealDir.entries(apply_root(p)) end |
#dir_exist?(p) ⇒ Boolean
15 16 17 |
# File 'lib/virtfs/nativefs/thick/dir_class_methods.rb', line 15 def dir_exist?(p) VfsRealDir.exist?(apply_root(p)) end |
#dir_foreach(p, &block) ⇒ Object
19 20 21 |
# File 'lib/virtfs/nativefs/thick/dir_class_methods.rb', line 19 def dir_foreach(p, &block) VfsRealDir.foreach(apply_root(p), &block) end |
#dir_mkdir(p, permissions) ⇒ Object
23 24 25 |
# File 'lib/virtfs/nativefs/thick/dir_class_methods.rb', line 23 def dir_mkdir(p, ) VfsRealDir.mkdir(apply_root(p), ) end |
#dir_new(fs_rel_path, hash_args, _open_path, cwd) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/virtfs/nativefs/thick/dir_class_methods.rb', line 27 def dir_new(fs_rel_path, hash_args, _open_path, cwd) owd = VfsRealDir.getwd begin VfsRealDir.chdir(cwd) return VfsRealDir.new(apply_root(fs_rel_path), hash_args) ensure VfsRealDir.chdir(owd) end end |