def seek(self, offset, whence):
        """Changes the current file position of this file.
        
        The file current position always applies to the :py:func:`IFile.read` 
        method.  Same for the :py:func:`IFile.write`  method it except when
        the :py:func:`IFile.access_mode`  is :py:attr:`FileAccessMode.append_only` 
        or :py:attr:`FileAccessMode.append_read` .

        in offset of type int
            Offset to seek relative to the position specified by @a whence.

        in whence of type :class:`FileSeekOrigin`
            One of the :py:class:`FileSeekOrigin`  seek starting points.

        return new_offset of type int
            The new file offset after the seek operation.

        """
        if not isinstance(offset, baseinteger):
            raise TypeError("offset can only be an instance of type baseinteger")
        if not isinstance(whence, FileSeekOrigin):
            raise TypeError("whence can only be an instance of type FileSeekOrigin")
        new_offset = self._call("seek",
                     in_p=[offset, whence])
        return new_offset