MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / target_file_exits

Method target_file_exits

mod/project/node/nodeutil/base.py:457–468  ·  view source on GitHub ↗
(self, target_file: str)

Source from the content-addressed store, hash-verified

455 return self._upload_little_file(filename, target_path, upload_name, call_log)
456
457 def target_file_exits(self, target_file: str) -> Tuple[bool, str]:
458 data, err = self._request("/files", "upload_files_exists", pdata={
459 "files": target_file,
460 })
461 if err:
462 return False, err
463 if not isinstance(data, list):
464 return False, "数据格式错误: %s" % str(data)
465 for f in data:
466 if f["filename"] == target_file and f["exists"]:
467 return True, ""
468 return False, ""
469
470 def upload_check(self, target_file_list: List[str]) -> Tuple[List[dict], str]:
471 data, err = self._request("/files", "upload_files_exists", pdata={

Callers 1

upload_fileMethod · 0.95

Calls 1

_requestMethod · 0.95

Tested by

no test coverage detected