def METHOD_NAME(self, bin_data: typing.Union[bytes, bytearray]):
    data_len = len(bin_data)
    req = FileWrite.Request(file_path=self.name, offset=self.offset, data=bin_data)
    ret = self._fm.cli_write.call(req)
    _check_raise_errno(ret)
    self.offset += data_len
    if self.offset > self.size:
        self.size = self.offset