Searched refs:file_obj (Results 1 – 4 of 4) sorted by relevance
/system/update_engine/scripts/update_payload/ |
D | test_utils.py | 56 def _WriteInt(file_obj, size, is_unsigned, val): argument 73 file_obj.write(struct.pack(common.IntPackingFmtStr(size, is_unsigned), val)) 76 (file_obj.name, e)) 231 def _WriteHeaderToFile(self, file_obj, manifest_len): argument 235 file_obj.write(payload.Payload._PayloadHeader._MAGIC) 236 _WriteInt(file_obj, payload.Payload._PayloadHeader._VERSION_SIZE, True, 238 _WriteInt(file_obj, payload.Payload._PayloadHeader._MANIFEST_LEN_SIZE, True, 241 def WriteToFile(self, file_obj, manifest_len=-1, data_blobs=None, argument 255 self._WriteHeaderToFile(file_obj, manifest_len) 256 file_obj.write(manifest) [all …]
|
D | common.py | 120 def Read(file_obj, length, offset=None, hasher=None): argument 139 file_obj.seek(offset) 141 file_obj.seek(offset, 2) 144 data = file_obj.read(length) 146 raise PayloadError('error reading from file (%s): %s' % (file_obj.name, e)) 151 (file_obj.name, len(data), length))
|
D | applier.py | 58 def _VerifySha256(file_obj, expected_hash, name, length=-1): argument 77 data = file_obj.read(read_length) 95 def _ReadExtents(file_obj, extents, block_size, max_length=-1): argument 117 file_obj.seek(ex.start_block * block_size) 118 data.fromfile(file_obj, read_length) 125 def _WriteExtents(file_obj, data, extents, block_size, base_name): argument 146 file_obj.seek(ex.start_block * block_size) 147 file_obj.write(data[data_offset:(data_offset + write_length)])
|
D | payload.py | 35 def _ReadInt(file_obj, size, is_unsigned, hasher=None): argument 55 common.Read(file_obj, size, hasher=hasher))[0]
|