MCPcopy Create free account
hub / github.com/chatmail/core / get_path

Method get_path

python/src/deltachat/testplugin.py:248–255  ·  view source on GitHub ↗

return path of file or None if it doesn't exist.

(self, bn)

Source from the content-addressed store, hash-verified

246 ]
247
248 def get_path(self, bn):
249 """return path of file or None if it doesn't exist."""
250 for path in self.paths:
251 fn = os.path.join(path, *bn.split("/"))
252 if os.path.exists(fn):
253 return fn
254 print(f"WARNING: path does not exist: {fn!r}")
255 return None
256
257 def read_path(self, bn, mode="r"):
258 fn = self.get_path(bn)

Callers 10

read_pathMethod · 0.95
test_message_imageMethod · 0.45
test_message_fileMethod · 0.45
test_webxdc_messageFunction · 0.45
test_webxdc_huge_updateFunction · 0.45
test_set_get_group_imageFunction · 0.45

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected