buffered_part_reader.py 文件源码

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

项目:oci-python-sdk 作者: oracle 项目源码 文件源码
def seek(self, offset, whence):
        """
        Seek within the part.  This is similar to the standard seek, except
        that io.SEEK_SET is the start of the part and io.SEEK_END is the
        end of the part.

        :param offset: Offset in bytes from location determined by the whence value
        :param whence: io.SEEK_END and io.SEEK_SET are supported.
        """
        if whence == io.SEEK_END:
            self.file.seek(self.start + self.size + offset, io.SEEK_SET)
        elif whence == io.SEEK_SET:
            self.file.seek(self.start + offset, io.SEEK_SET)
        else:
            raise RuntimeError("Unhandled whence value: {}".format(whence))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号