MCPcopy Index your code
hub / github.com/pyload/pyload / createChunks

Method createChunks

module/network/HTTPChunk.py:60–68  ·  view source on GitHub ↗
(self, chunks)

Source from the content-addressed store, hash-verified

58 self.chunks = []
59
60 def createChunks(self, chunks):
61 self.clear()
62 chunk_size = self.size / chunks
63
64 current = 0
65 for i in range(chunks):
66 end = self.size - 1 if (i == chunks - 1) else current + chunk_size
67 self.addChunk("%s.chunk%s" % (self.name, i), (current, end))
68 current += chunk_size + 1
69
70 def save(self):
71 fs_name = fs_encode("%s.chunks" % self.name)

Callers 1

_downloadMethod · 0.80

Calls 2

clearMethod · 0.95
addChunkMethod · 0.95

Tested by

no test coverage detected