Sha256: dc696adbc82106eae872c3de5b56ea3f6aa5ed999bf8c7a1a347480df88d2cda
Contents?: true
Size: 508 Bytes
Versions: 17
Compression:
Stored size: 508 Bytes
Contents
require 'net/ftp' class ExFTP < Net::FTP def mkdir_p(dir) parts = dir.split("/") if parts.first == "~" growing_path = "" else growing_path = "/" end 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) chdir(growing_path) rescue Net::FTPPermError, Net::FTPTempError => e end end end end
Version data entries
17 entries across 17 versions & 2 rubygems