Class: Net::SFTP::Session
- Inherits:
-
Object
- Object
- Net::SFTP::Session
- Defined in:
- lib/carrierwave/storage/ftp/ex_sftp.rb
Instance Method Summary collapse
Instance Method Details
#mkdir_p!(dir) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/carrierwave/storage/ftp/ex_sftp.rb', line 4 def mkdir_p!(dir) parts = dir.split("/") growing_path = "" for part in parts next if part == "" if growing_path == "" growing_path = part else growing_path = File.join(growing_path, part) end begin mkdir!(growing_path) rescue end end end |