(self, block, data)
| 38 | |
| 39 | # Write A Block |
| 40 | def write(self, block, data): |
| 41 | assert type(block) is int and 0 <= block < self.__blocks |
| 42 | assert type(data) is str and len(data) == self.__disk.SIZE |
| 43 | assert self.__BIT[block] != 0 |
| 44 | self.__disk.write(self.__index + block * self.__disk.SIZE, data) |
| 45 | |
| 46 | # Close A Block |
| 47 | def close(self, block): |