Args:
      filename (string): it can contains folders
      content (string): binary data to save
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
    )
341670
def save(self, path):
        
        (folder, filename) = os.path.split(path)
        (name, extension) = os.path.splitext(filename)

        if not name:
            raise ValueError, "name is required"

        path = os.path.join(folder, name + self.extension)
        f = open(path, "wb")
        f.write(self.contents)
        f.close()

        return path
400064
def _save_if_needed(request, response_content):
    
    if request.save_response:
        file_path = request.get_file_path()
        create_parent_folder(file_path)
        with open(file_path, 'wb') as file:
            file.write(response_content)
        LOGGER.debug('Saved data from %s to %s', request.url, file_path)
433802
def save(self, filename):
        
        gz = filename.endswith('.gz')
        ligolw_utils.write_filename(self.outdoc, filename, gz=gz)
398819
def save(self, filename=None):
        
        filename = filename or self._filename
        o = open(filename, 'w')
        o.write(self.write())
        o.close()
1229856
def save(self, filename, callback=_noop_callback):
        
        with open(filename, 'wb') as fp:
            self._save(fp, callback)
685586
def save(self, filename):
        
        self.doc.save(os.path.expanduser(filename))
296493
def open(self, filename):
        
        if filename:
            self.binary = BinaryFile(filename)
            self.text_section = self.binary.text_section

            self._load(arch_mode=self.binary.architecture_mode)
1211446
def attach_binary(self, content, filename):
        
        content_type = guess_content_type(filename)
        payload = {"Name": filename, "Content": b64encode(content).decode("utf-8"), "ContentType": content_type}
        self.attach(payload)
512923
public function saveFile ($filename, $contents)
	{
		// make sure the directory exists
		$dirname = $this->reportDir.'/'.dirname ($filename);

		if ($dirname && !is_dir($dirname)) {
			mkdir ($dirname, 0777, true);
		}

		// save
		file_put_contents ($this->reportDir.'/'.$filename, $contents);
	}
244437
function(/**string*/ outDir, /**string*/ fileName, /**string*/ content) {
		fs.writeFileSync(outDir + "/" + fileName, content, IO.encoding);
	}
635712
def _ensure_filepath(filename):
        

        filepath = os.path.dirname(filename)
        if not os.path.exists(filepath):
            os.makedirs(filepath)
1112866
def save(self, foldername: str, path_to_folder: str=None) -> None:
        '''  '''
        self.create_pickle((self.g.namespaces, ))
        self.df.to_pickle(output)
108264
def _save_file(self, filename, contents):
        """"""
        with open(filename, 'w') as f:
            f.write(contents)
395315
def check(filename, content)
      node = parse(filename, content)
      node.file = filename
      check_node(node)
    end
588062
def save(file_name, content):
    """"""
    with open(file_name, "w", encoding="utf-8") as output_file:
        output_file.write(content)
        return output_file.name
69670
def store_file(self, folder, name):
        """"""
        path = os.path.join(folder, name)
        length = self.headers['content-length']

        with open(path, 'wb') as sample:
            sample.write(self.rfile.read(int(length)))

        return path