Searched refs:file_obj (Results 1 – 4 of 4) sorted by relevance
/system/update_engine/scripts/update_payload/ |
D | test_utils.py | 55 def _WriteInt(file_obj, size, is_unsigned, val): argument 72 file_obj.write(struct.pack(common.IntPackingFmtStr(size, is_unsigned), val)) 75 (file_obj.name, e)) 224 def _WriteHeaderToFile(self, file_obj, manifest_len): argument 228 file_obj.write(payload.Payload._PayloadHeader._MAGIC) 229 _WriteInt(file_obj, payload.Payload._PayloadHeader._VERSION_SIZE, True, 231 _WriteInt(file_obj, payload.Payload._PayloadHeader._MANIFEST_LEN_SIZE, True, 234 def WriteToFile(self, file_obj, manifest_len=-1, data_blobs=None, argument 248 self._WriteHeaderToFile(file_obj, manifest_len) 249 file_obj.write(manifest) [all …]
|
D | common.py | 124 def Read(file_obj, length, offset=None, hasher=None): argument 143 file_obj.seek(offset) 145 file_obj.seek(offset, 2) 148 data = file_obj.read(length) 150 raise PayloadError('error reading from file (%s): %s' % (file_obj.name, e)) 155 (file_obj.name, len(data), length))
|
D | applier.py | 60 def _VerifySha256(file_obj, expected_hash, name, length=-1): argument 79 data = file_obj.read(read_length) 97 def _ReadExtents(file_obj, extents, block_size, max_length=-1): argument 123 file_obj.seek(ex.start_block * block_size) 124 data.fromfile(file_obj, read_length) 131 def _WriteExtents(file_obj, data, extents, block_size, base_name): argument 155 file_obj.seek(ex.start_block * block_size) 157 file_obj.write(data_view)
|
D | payload.py | 34 def _ReadInt(file_obj, size, is_unsigned, hasher=None): argument 54 common.Read(file_obj, size, hasher=hasher))[0]
|