Class: Net::SFTP::Session
- Inherits:
-
Object
- Object
- Net::SFTP::Session
- Defined in:
- lib/easy_backup/extension/net_sftp_session.rb
Instance Method Summary collapse
Instance Method Details
#mkpath!(path, options = {}) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/easy_backup/extension/net_sftp_session.rb', line 4 def mkpath!(path, ={}) path.split('/').inject(nil) do |previous, relative| current = previous ? "#{previous}/#{relative}" : relative mkdir! current, if dir.glob('.', current).empty? current end end |