MCPcopy
hub / github.com/modelscope/FunASR / write

Method write

funasr/download/file.py:369–381  ·  view source on GitHub ↗

Write data to a given ``filepath`` with 'wb' mode. Note: ``write`` will create a directory if the directory of ``filepath`` does not exist. Args: obj (bytes): Data to be written. filepath (str or Path): Path to write data.

(obj: bytes, uri: Union[str, Path])

Source from the content-addressed store, hash-verified

367
368 @staticmethod
369 def write(obj: bytes, uri: Union[str, Path]) -> None:
370 """Write data to a given ``filepath`` with 'wb' mode.
371
372 Note:
373 ``write`` will create a directory if the directory of ``filepath``
374 does not exist.
375
376 Args:
377 obj (bytes): Data to be written.
378 filepath (str or Path): Path to write data.
379 """
380 storage = File._get_storage(uri)
381 return storage.write(obj, uri)
382
383 @staticmethod
384 def write_text(obj: str, uri: str, encoding: str = "utf-8") -> None:

Callers 15

benchmark_vllm.pyFile · 0.45
write_fileFunction · 0.45
__process_batchFunction · 0.45
normalize_manifestFunction · 0.45
leFunction · 0.45
NeFunction · 0.45
zeFunction · 0.45
eiFunction · 0.45
MiFunction · 0.45
SiFunction · 0.45
BiFunction · 0.45
RiFunction · 0.45

Calls 1

_get_storageMethod · 0.45

Tested by

no test coverage detected