lib/smb/client/client_helper.rb
def put(from, to, overwrite = false, raise = true)
      ls_items = ls to, false
      if !overwrite && !ls_items.empty?
        raise Client::RuntimeError, "File [#{to}] already exist"
      end
      from = '"' + from + '"' if from.include? ' '
      to = '"' + to + '"' if to.include? ' '
      exec 'put ' + from + ' ' + to
      true
    rescue Client::RuntimeError => e
      raise e if raise
      false
    end
def put(from, to, overwrite = false, raise = true)
      ls_items = ls to, false
      if !overwrite && !ls_items.empty?
        raise Client::RuntimeError, "File [#{to}] already exist"
      end
      from = '"' + from + '"' if from.include? ' '
      to = '"' + to + '"' if to.include? ' '
      exec 'put ' + from + ' ' + to
      true
    rescue Client::RuntimeError => e
      raise e if raise
      false
    end
Upload a local file
 @param [String] from The source file path (on local machine)
 @param [String] to The destination file path
 @param [Boolean] overwrite Overwrite if exist on server?
 @param [Boolean] raise raise Error or just return +false+
 @return [Boolean] true on success