@classmethod
def addToArchive(cls, archive_pathname, added_pathname, in_archive_name=
    None, is_folder=False):
    """ Create archive if not existing
        """
    if archive_pathname.endswith(cls.archive_ext):
        with cls.opening_function(archive_pathname, 'a') as handle:
            if not is_folder:
                handle.write(added_pathname, arcname=in_archive_name)
            else:
                cls._add_folder_function(handle, added_pathname)
            try:
                cls.get_element(handle, in_archive_name)
            except KeyError:
                errmsg = ' '.join(['added element', added_pathname,
                    'With archive name', in_archive_name,
                    'abscent in archive', archive_pathname])
                return errmsg
    else:
        errmsg = ' '.join(['Invalid', cls.archive_ext, 'file:',
            archive_pathname])
    return None
