Build PUT statement string. Handle filesystem differences and escaping backslashes.

@param bindDir   the local directory which contains files with binds
@param stagePath the stage path to upload to
@return put statement for files in bindDir to stagePath
196424
private String getPutStmt(String bindDir, String stagePath)
  {
    return String.format(PUT_STMT, bindDir, File.separator, stagePath)
        .replaceAll("\\\\", "\\\\\\\\");
  }
1017709
private void doMatch(final FileStatusEntry entry, final Path path)
      throws IOException {
    if (entry.refresh(path)) {
      for (final PathAlterationListener listener : listeners.values()) {
        if (entry.isDirectory()) {
          listener.onDirectoryChange(path);
        } else {
          listener.onFileChange(path);
        }
      }
    }
  }
147891
private void appendPath(final StringBuilder buf) {
        if (parentZipFileSlice != null) {
            parentZipFileSlice.appendPath(buf);
            if (buf.length() > 0) {
                buf.append("!/");
            }
        }
        buf.append(pathWithinParentZipFileSlice);
    }
786507
@Override
    public T addAsDirectory(final String path) throws IllegalArgumentException {
        // Precondition check
        Validate.notNullOrEmpty(path, "path must be specified");

        // Delegate and return
        return this.addAsDirectory(ArchivePaths.create(path));
    }
66656
public static HttpRequestBase put(String path,
	                                  Map<String, String> headers,
	                                  Map<String, String> parameters,
	                                  Integer timeOutInSeconds) {

		return put(path, headers, parameters, null, timeOutInSeconds);
	}
933960
@PUT
    public JSONObject put(String path, JSONObject content, Map<String,String> headers) throws ServiceException, JSONException {
        throw new ServiceException(ServiceException.NOT_ALLOWED, "PUT not implemented");
    }
1099160
@Override
	public void put(File source, String destination)
			throws TransferFailedException, ResourceDoesNotExistException,
			AuthorizationException {
        if ( source.isDirectory() ) {
            throw new IllegalArgumentException( "Source is a directory: " + source );
        }
        
		String resourceName = FilenameUtils.separatorsToUnix(destination);
		Resource resource = new Resource(resourceName);

		firePutInitiated(resource, source);
		firePutStarted(resource, source);

		try {

			File file = new File(checkoutDirectory, destination);
			file.getParentFile().mkdirs();
			transfer(resource, source, new FileOutputStream(file), true);

		} catch (Exception e) {
			fireTransferError(resource, e, TransferEvent.REQUEST_PUT);
			throw new TransferFailedException("Unable to put file", e);
		}

		firePutCompleted(resource, source);
	}
562352
public URIBuilder setPath(final String path) {
		 this.path = path;
		 this.encodedSchemeSpecificPart = null;
		 this.encodedPath = null;
		 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;
	}
1106088
function Binding(toPath, fromPath) {
      this._direction = undefined;
      this._from = fromPath;
      this._to   = toPath;
      this._readyToSync = undefined;
      this._oneWay = undefined;
    }
536469
public void put(String fromPath, String toPath, Status status) {
        http.put(fromPath, redirectRoute(toPath, status));
    }
720019
def fs_put(self, rpath, data):
        
        try:
            self.begin()

            # Add the file to the fs
            self.file_put_contents(rpath, data)

            # Add to the manifest
            manifest = self.read_local_manifest()
            manifest['files'][rpath] = self.get_single_file_info(rpath)
            self.write_local_manifest(manifest)

            self.commit()
        except:
            self.rollback(); raise
614367
private List<String> binds() {
    final ImmutableList.Builder<String> binds = ImmutableList.builder();
    for (final Map.Entry<String, String> entry : job.getVolumes().entrySet()) {
      final String path = entry.getKey();
      final String source = entry.getValue();
      if (Strings.isNullOrEmpty(source)) {
        continue;
      }
      binds.add(source + ":" + path);
    }
    return binds.build();
  }
73316
def do_put(self, from_path, to_path):
        
        from_file = open(os.path.expanduser(from_path), "rb")

        self.n.put(self.current_path + "/" + from_path, to_path)
1176000
public SchemeRoot put(String scheme, SchemeRoot root)
  {
    return getUpdateMap().put(scheme, root);
  }
1224445
def put(localpath, destpath)
      create(destpath) { |dest|
        Kernel.open(localpath) { |source|
          # read 1 MB at a time
          while record = source.read(1048576)
            dest.write(record)
          end
        }
      }
    end
550062
public String put(String path, Response data) {
		return request("PUT", path, data, getDefaultOptions());
	}