Home
last modified time | relevance | path

Searched refs:file_obj (Results 1 – 4 of 4) sorted by relevance

/system/update_engine/scripts/update_payload/
Dtest_utils.py56 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 …]
Dcommon.py120 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))
Dapplier.py58 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)])
Dpayload.py38 def _ReadInt(file_obj, size, is_unsigned, hasher=None): argument
58 common.Read(file_obj, size, hasher=hasher))[0]