resfileloader.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:bfres 作者: Syroot 项目源码 文件源码
def load_custom(self, callback, offset: int = None):
        """
        Reads and returns an instance of arbitrary type from the following offset with the given callback or returns
        None if the read offset is 0.
        :param callback: The callback to read the instance data with.
        :param offset: The optional offset to use instead of reading a following one.
        :return: The data instance or None.
        """
        offset = offset or self.read_offset()
        if not offset:
            return None
        with self.temporary_seek(offset, io.SEEK_SET):
            return callback(self)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号