def get_conf_files(filename):
    """
    Return :class:`list` of the all configuration files. *filename* is a
    path of the main configuration file.

    ::

        >>> get_conf_files('exampleapp.conf')
        ['exampleapp.conf', 'exampleapp.conf.d/10-database.conf']
    """
    if not os.path.isfile(filename):
        raise ValueError("'%s' is not a file" % filename)
    conf_d_path = "%s.d" % filename
    if not os.path.exists(conf_d_path):
        return [filename]
    return [filename] + get_conf_d_files(conf_d_path)