gfapi.py 文件源码

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

项目:gkube 作者: guohongze 项目源码 文件源码
def lseek(self, pos, how):
        """
        Set the read/write offset position of this file.
        The new position is defined by 'pos' relative to 'how'

        :param pos: sets new offset position according to 'how'
        :param how: SEEK_SET, sets offset position 'pos' bytes relative to
                    beginning of file, SEEK_CUR, the position is set relative
                    to the current position and SEEK_END sets the position
                    relative to the end of the file.
        :returns: the new offset position
        """
        ret = api.glfs_lseek(self.fd, pos, how)
        if ret < 0:
            err = ctypes.get_errno()
            raise OSError(err, os.strerror(err))
        return ret
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号