MCPcopy Create free account
hub / github.com/ActiveState/code / write_block

Method write_block

recipes/Python/492211_dal3py/recipe-492211.py:407–412  ·  view source on GitHub ↗
(self, block, data)

Source from the content-addressed store, hash-verified

405
406 # Write A Block
407 def write_block(self, block, data):
408 assert type(block) is int and 1 <= block <= self.__blocks
409 assert type(data) is str and len(data) == self.__size
410 assert self.__disk.status(block) == self.STATUS.b1
411 self.__seed(data)
412 self.__disk.write(block, data)
413
414 # Close A Block
415 def close_block(self, block):

Callers 1

write_fileMethod · 0.80

Calls 2

statusMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected