@property
    def is_directory(self):
        """
        :return: whether this task is associated with a directory.
        :rtype: bool
        """
        if self.cid is None:
            msg = 'Cannot determine whether this task is a directory.'
            if not self.is_transferred:
                msg += ' This task has not been transferred.'
            raise TaskError(msg)
        return self.api.downloads_directory.cid != self.cid
dataset/ETHPy150Open shichao-an/115wangpan/u115/api.py/Task.is_directory/original