Class: Vos::Drivers::Local
- Includes:
- Vfs::Storages::Local::LocalVfsHelper
- Defined in:
- lib/vos/drivers/local.rb
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
- #bash(command) ⇒ Object
- #close ⇒ Object
-
#exec(command) ⇒ Object
Shell.
- #open(&block) ⇒ Object (also: #open_fs)
-
#to_s ⇒ Object
Other.
Methods inherited from Abstract
Constructor Details
This class inherits a constructor from Vos::Drivers::Abstract
Instance Method Details
#bash(command) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/vos/drivers/local.rb', line 29 def bash command code, stdout_and_stderr = Open3.popen2e command do |stdin, stdout_and_stderr, wait_thread| [wait_thread.value.to_i, stdout_and_stderr.read] end return code, stdout_and_stderr end |
#close ⇒ Object
14 |
# File 'lib/vos/drivers/local.rb', line 14 def close; end |
#exec(command) ⇒ Object
Shell
20 21 22 23 24 25 26 |
# File 'lib/vos/drivers/local.rb', line 20 def exec command code, stdout, stderr = Open3.popen3 command do |stdin, stdout, stderr, waitth| [waitth.value.to_i, stdout.read, stderr.read] end return code, stdout, stderr end |
#open(&block) ⇒ Object Also known as: open_fs
10 11 12 |
# File 'lib/vos/drivers/local.rb', line 10 def open &block block.call self if block end |
#to_s ⇒ Object
Other
41 |
# File 'lib/vos/drivers/local.rb', line 41 def to_s; '' end |