MCPcopy Create free account
hub / github.com/modelscope/modelscope / as_local_path

Method as_local_path

modelscope/fileio/file.py:324–328  ·  view source on GitHub ↗

Only for unified API and do nothing.

(uri: str)

Source from the content-addressed store, hash-verified

322
323 @contextlib.contextmanager
324 def as_local_path(uri: str) -> Generator[Union[str, Path], None, None]:
325 """Only for unified API and do nothing."""
326 storage = File._get_storage(uri)
327 with storage.as_local_path(uri) as local_path:
328 yield local_path

Callers 2

__call__Method · 0.45
test_fileMethod · 0.45

Calls 1

_get_storageMethod · 0.80

Tested by 1

test_fileMethod · 0.36