# Gimp.file_has_extension

    @accepts(Gio.File, unicode)
    @returns(bool)
    def file_has_extension(file, extension):
        # Python wrapper for gimp_file_has_extension()

This function checks if file's URI ends with extension. It behaves like g_str_has_suffix() on g_file_get_uri(), except that the string comparison is done case-insensitively using g_ascii_strcasecmp().

Since 2.10

file

  a Gio.File

extension

  an ASCII extension

Returns