qlat.QarFile¶
- class qlat.QarFile(str path=None, *, str mode=None)¶
- __init__()¶
QarFile(path=path, mode=mode)
Parameters are keyword-only. Use:
QarFile(path="/path/to/file.qar", mode="w")
or the
open_qar()convenience wrapper which accepts positional args.
Methods
QarFile(path=path, mode=mode)
close(self)copy(self, bool is_copying_data=True)flush(self)has(self, string fn)Check if an entry exists in this QAR archive (regular file or otherwise).
has_regular_file(self, string fn)Check if a regular file entry exists in this QAR archive.
index_size(self)index_size_saved(self)list(self)List entries in this QAR archive.
mode(self)null(self)path(self)read(self, string fn)return qfile
read_data(self, string fn)Read entry data as a Python
str(UTF-8 decoded).read_data_bytes(self, string fn)Read entry data as raw
bytes.read_index(self, string qar_index_content)read_info(self, string fn)save_index(self, Long max_diff=0)show_index(self)verify_index(self)write(self, string fn, string info, data, *, ...)