MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / needFileInfo

Method needFileInfo

src/Site/Site.py:732–741  ·  view source on GitHub ↗
(self, inner_path)

Source from the content-addressed store, hash-verified

730 return True
731
732 def needFileInfo(self, inner_path):
733 file_info = self.content_manager.getFileInfo(inner_path)
734 if not file_info:
735 # No info for file, download all content.json first
736 self.log.debug("No info for %s, waiting for all content.json" % inner_path)
737 success = self.downloadContent("content.json", download_files=False)
738 if not success:
739 return False
740 file_info = self.content_manager.getFileInfo(inner_path)
741 return file_info
742
743 # Check and download if file not exist
744 def needFile(self, inner_path, update=False, blocking=True, peer=None, priority=0):

Callers 2

needFileMethod · 0.95
needFileMethod · 0.80

Calls 2

downloadContentMethod · 0.95
getFileInfoMethod · 0.45

Tested by

no test coverage detected