Lines Matching refs:size
86 self.idx = self.size - amount
92 if self.idx > self.size:
93 self.idx = self.size
102 def __init__(self, fs, cluster, size=None): argument
111 self.size = size
113 if self.size is None:
114 self.size = fs.get_chain_size(cluster)
118 def read(self, size): argument
120 if self.idx + size > self.size:
121 size = self.size - self.idx
122 got = self.fs.read_file(self.start_cluster, self.idx, size)
131 if self.idx > self.size:
132 self.size = self.idx
154 to_read = self.backing.size / 32
169 size): argument
182 longname, first_cluster, size)
220 size = 0
223 size = data.tell()
226 chunk = self.backing.fs.allocate(size) if size > 0 else 0
228 self.add_dentry(0, shortname, ext, name, chunk, size)
233 data_file = fat_file(self.backing.fs, chunk, size)
285 first_cluster, size): argument
305 self.size = size
318 return self.name() + " (" + str(self.size) + \
328 return fat_file(self.fs, self.first_cluster, self.size)
392 self.size)
425 self.size = fs.root_entries * 32
431 if self.idx + count > self.size:
432 count = self.size - self.idx
442 if self.idx + len(data) > self.size:
443 data = data[:self.size - self.idx]
447 if self.idx > self.size:
448 self.size = self.idx
560 size = read_le_long(f)
572 size), consumed)
574 def read_file(self, head_cluster, start_byte, size): argument
583 assert size >= 0, "Can't read a negative amount"
584 if size == 0:
590 size_now = size
591 if start_byte + size > self.bytes_per_cluster:
595 size -= size_now
606 if size == 0:
686 for cluster, size in grabbed_zones:
687 entries = range(cluster + 1, cluster + size)