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

Version Path
activestorage-ftp-0.1.0 lib/active_storage_ftp/ex_ftp.rb
carrierwave-ftp-0.4.1 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.4.0 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.3.1 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.3.0 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.2.8 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.2.7 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.2.6 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.2.5 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.2.4 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.2.3 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.2.2 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.2.1 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.2.0 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.1.2 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.1.1 lib/carrierwave/storage/ftp/ex_ftp.rb
carrierwave-ftp-0.1.0 lib/carrierwave/storage/ftp/ex_ftp.rb