MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / isDownloaded

Method isDownloaded

src/Content/ContentManager.py:372–378  ·  view source on GitHub ↗
(self, inner_path, hash_id=None)

Source from the content-addressed store, hash-verified

370 return False
371
372 def isDownloaded(self, inner_path, hash_id=None):
373 if not hash_id:
374 file_info = self.getFileInfo(inner_path)
375 if not file_info or "sha512" not in file_info:
376 return False
377 hash_id = self.hashfield.getHashId(file_info["sha512"])
378 return hash_id in self.hashfield
379
380 # Is modified since signing
381 def isModified(self, inner_path):

Callers 1

verifyFilesMethod · 0.45

Calls 2

getFileInfoMethod · 0.95
getHashIdMethod · 0.45

Tested by 1

verifyFilesMethod · 0.36