def files(self):
        """Files in torrent.

        List of namedtuples (filepath, size).

        :rtype: list[TorrentFile]
        """
        files = []
        info = self._struct.get('info')

        if not info:
            return files

        if 'files' in info:
            base = info['name']

            for f in info['files']:
                files.append(TorrentFile(join(base, *f['path']), f['length']))

        else:
            files.append(TorrentFile(info['name'], info['length']))

        return files
Files in torrent.

        List of namedtuples (filepath, size).

        :rtype: list[TorrentFile]