'Set the file pointer to the given spot. @see file.seek'

@require_open
def seek(self, offset, whence=0):

    if (whence == SEEK_SET):
        self.pos = offset
    elif (whence == SEEK_CUR):
        self.pos += offset
    elif (whence == SEEK_END):
        self.pos = (self._stat().length + offset)
    else:
        raise IOError(errno.EINVAL, 'Invalid    argument    to    seek    for    whence')
