MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / list_files_endpoint

Method list_files_endpoint

utils.py:805–816  ·  view source on GitHub ↗
(self, handler)

Source from the content-addressed store, hash-verified

803 return files
804
805 def list_files_endpoint(self, handler):
806 try:
807 files = self.list_files(self.shared_data.datastolendir)
808 handler.send_response(200)
809 handler.send_header("Content-type", "application/json")
810 handler.end_headers()
811 handler.wfile.write(json.dumps(files).encode('utf-8'))
812 except Exception as e:
813 handler.send_response(500)
814 handler.send_header("Content-type", "application/json")
815 handler.end_headers()
816 handler.wfile.write(json.dumps({"status": "error", "message": str(e)}).encode('utf-8'))
817
818 def download_file(self, handler):
819 try:

Callers

nothing calls this directly

Calls 3

list_filesMethod · 0.95
writeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected