@guard
    def read(self, tfid, path, size, offset, f):
        data = bytes()
        i = 0
        while True:
            # we do not rely nor on msize, neither on iounit,
            # so, shift offset only with real data read
            ret = self.client._read(f.fid, offset,
                    min(size - len(data), f.iounit))
            data += ret.data
            offset += len(ret.data)
            if size <= len(data) or len(ret.data) == 0:
                break
            i += 1
        return data[:size]
dataset/ETHPy150Open svinota/py9p/py9p/fuse9p.py/ClientFS.read/original