maat.FileAccessor class

A wrapper class to read and write to a symbolic file, similar to a FILE* in Linux.

❱   Methods

list[ Value ] read_buffer(int nb_elems, [int elem_size=1])

Read a buffer from a symbolic file. The read offset is updated according to the number of bytes read.

Parameters
nb_elems Number of elements to read from the file
elem_size (Optional) Size in bytes of each element read from the file

int write_buffer(Union[bytes, list[ Value ]] buffer)

Write a buffer to a symbolic file. Returns the number of bytes written. The write offset in the file is adjusted according to the number of bytes written.

Parameters
buffer Either concrete bytes or abstract values to write in the file