Put a string to an S3 path.
        :param content: Data str
        :param destination_s3_path: URL for target S3 location
        :param kwargs: Keyword arguments are passed to the boto3 function `put_object`
358989
def put_string(self, content, destination_s3_path, **kwargs):
        
        self._check_deprecated_argument(**kwargs)
        (bucket, key) = self._path_to_bucket_and_key(destination_s3_path)

        # put the file
        self.s3.meta.client.put_object(
            Key=key, Bucket=bucket, Body=content, **kwargs)
638760
def s3_upload(source, destination, profile_name=None):
    
    session = boto3.Session(profile_name=profile_name)
    s3 = session.resource('s3')
    bucket_name, key = _s3_path_split(destination)
    with open(source, 'rb') as data:
        s3.Bucket(bucket_name).put_object(Key=key, Body=data)
1069293
def _copy_content(self, origin, dstPath):
        

        if hasattr(origin, 'read'):
            copy_content(origin, dstPath, self.BLOCK_SIZE, self._conf['fmode'])
        elif os.path.isfile(origin):
            with open(origin, 'rb') as f:
                copy_content(f, dstPath, self.BLOCK_SIZE, self._conf['fmode'])
        else:
            raise ValueError("Could not copy content, `origin` should be a path or a readable object")
303133
def write_to(self, content, content_type):
    
    try:
      self._api.object_upload(self._bucket, self._key, content, content_type)
    except Exception as e:
      raise e
1128241
def put(self, path, data, **options):
        
        data, options = self._update_request(data, options)
        return self.request('put', path, data=data, **options)
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)
116423
def move_to(self, destination):
        
        target = self.__get_destination__(destination)
        logger.info("Move %s to %s" % (self, target))
        shutil.move(self.path, unicode(target))
        return target
1373423
def create_at_path(self, asset_content, url_path, tags=''):
        

        return self._create_asset({
            'asset': b64encode(asset_content),
            'url-path': url_path,
            'tags': tags,
            'type': 'base64'
        })
1303990
function Route(path,content,operation){
	if(typeof(path) === 'string'){
		if(path === '*') path = '.*';
		path = new RegExp(path);
	}
	if(typeof(content) === 'string'){
		if(content === '*') content = '.*';
		content = new RegExp(content);
	}
	this.path = path;
	this.content = content;
	this.operation = operation;
}
1109043
function putFn (req, res, next) {
    var reqPath = req.params[0];
    var destination = req.body.rename;
    debug('putFn', 'reqPath', reqPath);

    fs.rename(path.join(ramlPath, reqPath), path.join(ramlPath, destination), function (err) {
      if (err) return next(err);
      res.sendStatus(200);
    });
  }
1148700
def put_object(
        connection, container: str, object_name: str,
        contents, content_type: str) -> None:
    

    connection.put_object(
        container, object_name, contents=contents,
        content_type=content_type)
87107
def put_string(path, str)
      path = @uri.merge(path).path
      res = @handler.request_sending_body(:put, path, str, @headers)
      res.body
    end
513542
def put_file(self, file_path, content, content_type=None, compress=None, cache_control=None):
    
    return self.put_files([ (file_path, content) ], 
      content_type=content_type, 
      compress=compress, 
      cache_control=cache_control, 
      block=False
    )
810878
def string_append(filepath, newcontent, backup=false)
      file_append(remote_path, StringIO.new(str), backup)
    end
1077910
def add_file(self, git_path, content):
        
        blob_id = self.write_blob(content)
        self.add_index('100644', blob_id, git_path)
1269878
def put_mapping(self, doc_type=None, mapping=None, indices=None, ignore_conflicts=None):
        
        if not isinstance(mapping, dict):
            if mapping is None:
                mapping = {}
            if hasattr(mapping, "as_dict"):
                mapping = mapping.as_dict()

        if doc_type:
            path = self.conn._make_path(indices, doc_type, "_mapping")
            if doc_type not in mapping:
                mapping = {doc_type: mapping}
        else:
            path = self.conn._make_path(indices, (), "_mapping")

        parameters = {}

        if ignore_conflicts is not None:
            parameters['ignore_conflicts'] = ignore_conflicts

        return self.conn._send_request('PUT', path, mapping, params=parameters)
420367
def put_content(self, content):
        

        self.blob.content_encoding = self.content_encoding
        self.blob.metadata = self.metadata
        return self.blob.upload_from_string(content, content_type=self.content_type)