r"""Retrieves the contents of a file identified by hash.

        .. code-block:: python

            >>> c.cat('QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D')
            Traceback (most recent call last):
              ...
            ipfsapi.exceptions.Error: this dag node is a directory
            >>> c.cat('QmeKozNssnkJ4NcyRidYgDY2jfRZqVEoRGfipkgath71bX')
            b'<!DOCTYPE html>\n<html>\n\n<head>\n<title>ipfs example viewer</…'

        Parameters
        ----------
        multihash : str
            The path to the IPFS object(s) to be retrieved
        offset : int
            Byte offset to begin reading from
        length : int
            Maximum number of bytes to read(-1 for all)

        Returns
        -------
            str : File contents

def cat(self, multihash, offset=0, length=-1, **kwargs):
        r"""Retrieves the contents of a file identified by hash.

        .. code-block:: python

            >>> c.cat('QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D')
            Traceback (most recent call last):
              ...
            ipfsapi.exceptions.Error: this dag node is a directory
            >>> c.cat('QmeKozNssnkJ4NcyRidYgDY2jfRZqVEoRGfipkgath71bX')
            b'<!DOCTYPE html>\n<html>\n\n<head>\n<title>ipfs example viewer</…'

        Parameters
        ----------
        multihash : str
            The path to the IPFS object(s) to be retrieved
        offset : int
            Byte offset to begin reading from
        length : int
            Maximum number of bytes to read(-1 for all)

        Returns
        -------
            str : File contents
        """
        opts = {}
        if offset != 0:
            opts['offset'] = offset
        if length != -1:
            opts['length'] = length
        args = (multihash,)
        return self._client.request('/cat', args, opts=opts, **kwargs)