(self, path: str, file: utils.clean_file_t, offset: int = 0,
	          create: bool = False, truncate: bool = False,
	          count: ty.Optional[int] = None, **kwargs: base.CommonArgs)
return self._client.request('/files/write', args, data=body, headers=headers, **kwargs)
Writes a file into the MFS
		
		.. code-block:: python
		
			>>> client.files.write("/test/file", io.BytesIO(b"hi"), create=True)
		
		Parameters
		----------
		path
			Filepath within the MFS
		file
			IO stream object with data that should be written
		offset
			Byte offset at which to begin writing at
		create
			Create the file if it does not exist
		truncate
			Truncate the file to size zero before writing
		count
			Maximum number of bytes to read from the source ``file``
Writes a file into the MFS
		
		.. code-block:: python
		
			>>> client.files.write("/test/file", io.BytesIO(b"hi"), create=True)
		
		Parameters
		----------
		path
			Filepath within the MFS
		file
			IO stream object with data that should be written
		offset
			Byte offset at which to begin writing at
		create
			Create the file if it does not exist
		truncate
			Truncate the file to size zero before writing
		count
			Maximum number of bytes to read from the source ``file``
Writes a file into the MFS .. code - block :: python >>> client . files . write ( / test / file io . BytesIO ( b hi ) create = True ) Parameters ---------- path Filepath within the MFS file IO stream object with data that should be written offset Byte offset at which to begin writing at create Create the file if it does not exist truncate Truncate the file to size zero before writing count Maximum number of bytes to read from the source file
def write(self, path: str, file: utils.clean_file_t, offset: int = 0,
	          create: bool = False, truncate: bool = False,
	          count: ty.Optional[int] = None, **kwargs: base.CommonArgs):
		"""Writes a file into the MFS
		
		.. code-block:: python
		
			>>> client.files.write("/test/file", io.BytesIO(b"hi"), create=True)
		
		Parameters
		----------
		path
			Filepath within the MFS
		file
			IO stream object with data that should be written
		offset
			Byte offset at which to begin writing at
		create
			Create the file if it does not exist
		truncate
			Truncate the file to size zero before writing
		count
			Maximum number of bytes to read from the source ``file``
		"""
		opts = {"offset": offset, "create": create, "truncate": truncate}
		if count is not None:
			opts["count"] = count
		kwargs.setdefault("opts", {}).update(opts)
		
		args = (path,)
		body, headers = multipart.stream_files(file, chunk_size=self.chunk_size)
		return self._client.request('/files/write', args, data=body, headers=headers, **kwargs)
def write ( self , path : str , file : utils . clean_file_t , offset : int = 0 , create : bool = False , truncate : bool = False , count : ty . Optional [ int ] = None , * * kwargs : base . CommonArgs ) : opts = { "offset" : offset , "create" : create , "truncate" : truncate } if count is not None : opts [ "count" ] = count kwargs . setdefault ( "opts" , { } ) . update ( opts ) args = ( path , ) body , headers = multipart . stream_files ( file , chunk_size = self . chunk_size ) return self . _client . request ( '/files/write' , args , data = body , headers = headers , * * kwargs )