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

Function openArchiveFile

plugins/FilePack/FilePackPlugin.py:36–41  ·  view source on GitHub ↗
(archive_path, path_within, file_obj=None)

Source from the content-addressed store, hash-verified

34
35
36def openArchiveFile(archive_path, path_within, file_obj=None):
37 archive = openArchive(archive_path, file_obj=file_obj)
38 if archive_path.endswith(".zip"):
39 return archive.open(path_within)
40 else:
41 return archive.extractfile(path_within)
42
43
44@PluginManager.registerTo("UiRequest")

Callers 1

actionSiteMediaMethod · 0.85

Calls 2

openArchiveFunction · 0.85
openMethod · 0.80

Tested by

no test coverage detected