MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / _get_path_str

Method _get_path_str

core/storage.py:617–625  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

615 return result
616
617 def _get_path_str(self, path):
618 if isinstance(path, str):
619 path = path.replace("\\", "/").replace("//", "/").split("/")
620 elif isinstance(path, Path):
621 path = str(path).replace("\\", "/").replace("//", "/").split("/")
622 else:
623 raise TypeError("path must be str or Path")
624 path[-1] = path[-1].split(".")[0]
625 return "/".join(path)
626
627 def _save(self, file, save_path):
628 content = file.file.read()

Callers 6

_saveMethod · 0.95
_deleteMethod · 0.95
_get_file_urlMethod · 0.95
_read_chunkMethod · 0.95
_delete_chunk_dirMethod · 0.95
_file_existsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected