def resolve(self, file_path, follow_symlinks=True, allow_fd=False):
        """Search for the specified filesystem object, resolving all links.

        Args:
            file_path: Specifies the target FakeFile object to retrieve.
            follow_symlinks: If `False`, the link itself is resolved,
                otherwise the object linked to.
            allow_fd: If `True`, `file_path` may be an open file descriptor

        Returns:
          The FakeFile object corresponding to `file_path`.

        Raises:
            IOError: if the object is not found.
        """
        if isinstance(file_path, int):
            if allow_fd and sys.version_info >= (3, 3):
                return self.get_open_file(file_path).get_object()
            raise TypeError('path should be string, bytes or '
                            'os.PathLike (if supported), not int')

        if follow_symlinks:
            file_path = make_string_path(file_path)
            return self.get_object_from_normpath(self.resolve_path(file_path))
        return self.lresolve(file_path)
Search for the specified filesystem object, resolving all links.

        Args:
            file_path: Specifies the target FakeFile object to retrieve.
            follow_symlinks: If `False`, the link itself is resolved,
                otherwise the object linked to.
            allow_fd: If `True`, `file_path` may be an open file descriptor

        Returns:
          The FakeFile object corresponding to `file_path`.

        Raises:
            IOError: if the object is not found.