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

Method getFileInfo

plugins/Bigfile/BigfilePlugin.py:203–210  ·  view source on GitHub ↗
(self, inner_path, *args, **kwargs)

Source from the content-addressed store, hash-verified

201@PluginManager.registerTo("ContentManager")
202class ContentManagerPlugin(object):
203 def getFileInfo(self, inner_path, *args, **kwargs):
204 if "|" not in inner_path:
205 return super(ContentManagerPlugin, self).getFileInfo(inner_path, *args, **kwargs)
206
207 inner_path, file_range = inner_path.split("|")
208 pos_from, pos_to = map(int, file_range.split("-"))
209 file_info = super(ContentManagerPlugin, self).getFileInfo(inner_path, *args, **kwargs)
210 return file_info
211
212 def readFile(self, file_in, size, buff_size=1024 * 64):
213 part_num = 0

Callers 15

optionalDownloadedMethod · 0.95
optionalRemovedMethod · 0.95
addBigfileInfoMethod · 0.45
actionBigfileUploadMethod · 0.45
actionFileDeleteMethod · 0.45
getPiecemapMethod · 0.45
writeMethod · 0.45
checkBigfileMethod · 0.45
__init__Method · 0.45
isReadableMethod · 0.45

Calls

no outgoing calls

Tested by 5

testDownloadStatsMethod · 0.36
testPrebufferMethod · 0.36
testNullFileReadMethod · 0.36