Creates new put command message.
@param localPath
@param remotePath
@param type
@return
972611
public static FtpMessage put(String localPath, String remotePath, DataType type) {
        PutCommand cmd = new PutCommand();
        cmd.setSignal(FTPCmd.STOR.getCommand());

        PutCommand.File file = new PutCommand.File();
        file.setPath(localPath);
        file.setType(type.name());
        cmd.setFile(file);

        PutCommand.Target target = new PutCommand.Target();
        target.setPath(remotePath);
        cmd.setTarget(target);
        return new FtpMessage(cmd);
    }
199376
def copy_file_to_remote(self, local_path, remote_path):
        
        sftp_client = self.transport.open_sftp_client()
        LOG.debug('Copy the local file to remote. '
                  'Source=%(src)s. Target=%(target)s.' %
                  {'src': local_path, 'target': remote_path})
        try:
            sftp_client.put(local_path, remote_path)
        except Exception as ex:
            LOG.error('Failed to copy the local file to remote. '
                      'Reason: %s.' % six.text_type(ex))
            raise SFtpExecutionError(err=ex)
1229456
public Response mkCol(Session session, String path, String nodeType, List<String> mixinTypes, List<String> tokens)
   {

      Node node;
      try
      {
         nullResourceLocks.checkLock(session, path, tokens);

         node = session.getRootNode().addNode(TextUtil.relativizePath(path), nodeType);
         // We set the new path
         path = node.getPath();

         if (mixinTypes != null)
         {
            addMixins(node, mixinTypes);
         }
         session.save();

      }

      catch (ItemExistsException exc)
      {
         return Response.status(HTTPStatus.METHOD_NOT_ALLOWED).entity(exc.getMessage()).build();

      }
      catch (PathNotFoundException exc)
      {
         return Response.status(HTTPStatus.CONFLICT).entity(exc.getMessage()).build();

      }
      catch (AccessDeniedException exc)
      {
         return Response.status(HTTPStatus.FORBIDDEN).entity(exc.getMessage()).build();

      }
      catch (LockException exc)
      {
         return Response.status(HTTPStatus.LOCKED).entity(exc.getMessage()).build();

      }
      catch (RepositoryException exc)
      {
         log.error(exc.getMessage(), exc);
         return Response.serverError().entity(exc.getMessage()).build();
      }

      if (uriBuilder != null)
      {
         return Response.created(uriBuilder.path(session.getWorkspace().getName()).path(path).build()).build();
      }

      // to save compatibility if uriBuilder is not provided
      return Response.status(HTTPStatus.CREATED).build();
   }
1260940
public Javalin put(@NotNull String path, @NotNull Handler handler) {
        return addHandler(HandlerType.PUT, path, handler);
    }
89078
protected ResourceBundle createResourceBundle (String setType, String path,
        List<ResourceBundle> dlist)
    {
        if (setType.equals(FILE_SET_TYPE)) {
            FileResourceBundle bundle =
                createFileResourceBundle(getResourceFile(path), true, _unpack);
            if (!bundle.isUnpacked() || !bundle.sourceIsReady()) {
                dlist.add(bundle);
            }
            return bundle;
        } else if (setType.equals(NETWORK_SET_TYPE)) {
            return createNetworkResourceBundle(_networkRootPath, path, getResourceList());
        } else {
            throw new IllegalArgumentException("Unknown set type: " + setType);
        }
    }
202232
def put(path, options = {})
      ext = options[:ext] || File.extname(path)
      path = path.to_s
      resp = http_post("/v1/#{appkey}",
                       File.open(path.start_with?('/') ? path : fpath(path)).read,
                       :params => {
                         :suffix => ext,
                         :simple_name => options[:simple_name] || 0
                       },
                       :accept => :json)

      json = JSON.parse(resp)
      json && json['TFS_FILE_NAME']
    end
555108
def upload(self, local_path, remote_url):
        """"""
        bucket, key = _parse_url(remote_url)

        with open(local_path, 'rb') as fp:
            return self.call("PutObject", bucket=bucket, key=key, body=fp)
271647
public static <T> SimplePath<T> simplePath(Class<? extends T> type, Path<?> parent, String property) {
        return new SimplePath<T>(type, PathMetadataFactory.forProperty(parent, property));
    }
306557
public Response put(String filePath, String key, String token) throws QiniuException {
        return put(filePath, key, token, null, null, false);
    }
430794
protected HttpPut generatePutRequest(final String path, final Map<String, Object> paramMap) {
        final HttpPut put = new HttpPut(buildUri(path));
        if (paramMap != null) {
            put.setEntity(new StringEntity(JSONObject.toJSONString(paramMap), ContentType.APPLICATION_JSON));
        }
        return put;
    }
1044940
function put($path, $body, $contentType = null)
	{
		return $this->_dispatchRequest(
			$this->_buildRequest('PUT', $path, $body, $contentType)
		);
	}
1101301
public Git cloneRepository(String remoteUrl, Path localPath) {
        try {
            return Git.cloneRepository()
                .setURI(remoteUrl)
                .setDirectory(localPath.toFile())
                .call();
        } catch (GitAPIException e) {
            throw new IllegalStateException(e);
        }
    }
347721
public CommandArgs<K, V> add(CommandType type) {

        LettuceAssert.notNull(type, "CommandType must not be null");
        singularArguments.add(ProtocolKeywordArgument.of(type));
        return this;
    }
257520
public Sftp put(String srcFilePath, String destPath, Mode mode) {
		try {
			channel.put(srcFilePath, destPath, mode.ordinal());
		} catch (SftpException e) {
			throw new JschRuntimeException(e);
		}
		return this;
	}
1026817
@Deprecated
    public <T> MutateInBuilder upsert(String path, T fragment, boolean createPath) {
        asyncBuilder.upsert(path, fragment, new SubdocOptionsBuilder().createPath(createPath));
        return this;
    }
905860
private File createNewFile(String path) throws IOException {

		// In windows, pathnames with spaces are returned as %20
		if (path.contains("%20"))
			path = path.replaceAll("%20", " ");
		File newFile = new File(path);

		if (!newFile.exists() && !newFile.createNewFile()) {
			throw new BundlingProcessException("Unable to create a temporary file at " + path);
		}

		if (LOGGER.isDebugEnabled())
			LOGGER.debug("Created file: " + newFile.getCanonicalPath());
		return newFile;
	}
130784
private File createTmpFile(final String path) throws IOException {
        getLog().debug("Creating temporary file for: " + path);
        final File output = new File(System.getProperty("java.io.tmpdir"), "ansible-maven-plugin." + System.nanoTime());
        final FileOutputStream outputStream = new FileOutputStream(output);
        final InputStream inputStream = getClass().getResourceAsStream("/" + path);
        if (inputStream == null){
            throw new FileNotFoundException("Unable to locate: " + path);
        }
        copy(inputStream, outputStream);
        return output;
    }