code: public void uploadForDeployment(String from, String to) throws Exception {
          File fromFile = new File(from);
          if (!to.isEmpty() && fromFile.isDirectory())
              mkDir(to);
          else
              upload(from, to);
  
  
      }
docs: Creates the directory for the file if necessary
  and uploads the file
  @param from the directory to upload from
  @param to the destination directory on the remote server
  @throws Exception