Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GnomeAutoar.check_mime_type_supported(mime_type)¶
- Parameters:
mime_type (
str
) – a string representing the mime type- Returns:
True
if the mime type is supported- Return type:
Checks whether a mime type is supported by autoar. This function does no blocking IO.
- GnomeAutoar.filter_get_description(filter)¶
- Parameters:
filter (
GnomeAutoar.Filter
) – anGnomeAutoar.Filter
- Returns:
description about the filter
- Return type:
Gets description of the filter from the internal static data.
- GnomeAutoar.filter_get_description_libarchive(filter)¶
- Parameters:
filter (
GnomeAutoar.Filter
) – anGnomeAutoar.Filter
- Returns:
description about the filter. Free the returned string with
GLib.free
().- Return type:
Gets description of the filter from libarchive. This function creates and destroys an archive object in order to get the description string.
- GnomeAutoar.filter_get_extension(filter)¶
- Parameters:
filter (
GnomeAutoar.Filter
) – anGnomeAutoar.Filter
- Returns:
a file name extension
- Return type:
Gets the file name extension of the filter from the internal static data.
- GnomeAutoar.filter_get_filter_libarchive(filter)¶
- Parameters:
filter (
GnomeAutoar.Filter
) – anGnomeAutoar.Filter
- Returns:
an integer
- Return type:
Gets the filter code used by libarchive. You can use the return value as the argument for archive_write_add_filter().
- GnomeAutoar.filter_get_mime_type(filter)¶
- Parameters:
filter (
GnomeAutoar.Filter
) – anGnomeAutoar.Filter
- Returns:
an MIME type
- Return type:
Gets the MIME type of the filter from the internal static data.
- GnomeAutoar.filter_is_valid(filter)¶
- Parameters:
filter (
GnomeAutoar.Filter
) – anGnomeAutoar.Filter
- Returns:
True
if the value of filter is valid- Return type:
Checks whether an
GnomeAutoar.Filter
is valid.
- GnomeAutoar.filter_last()¶
- Returns:
maximal allowed values of
GnomeAutoar.Filter
- Return type:
Gets the maximal allowed values of
GnomeAutoar.Filter
- GnomeAutoar.format_filter_get_description(format, filter)¶
- Parameters:
format (
GnomeAutoar.Format
) – anGnomeAutoar.Format
filter (
GnomeAutoar.Filter
) – anGnomeAutoar.Filter
- Returns:
description about the archive. Free the returned string with
GLib.free
().- Return type:
Gets the description for an archive format compressed by filter using #GContentType and
GnomeAutoar.format_filter_get_mime_type
().
- GnomeAutoar.format_filter_get_extension(format, filter)¶
- Parameters:
format (
GnomeAutoar.Format
) – anGnomeAutoar.Format
filter (
GnomeAutoar.Filter
) – anGnomeAutoar.Filter
- Returns:
a file name extension. Free the returned string with
GLib.free
().- Return type:
Gets the file name extension for an archive format compressed by filter. The first character of the returned string is always ‘.’
- GnomeAutoar.format_filter_get_mime_type(format, filter)¶
- Parameters:
format (
GnomeAutoar.Format
) – anGnomeAutoar.Format
filter (
GnomeAutoar.Filter
) – anGnomeAutoar.Filter
- Returns:
an MIME type. Free the returned string with
GLib.free
().- Return type:
Gets the MIME type for an archive format compressed by filter. This function always succeed, but it is not guaranteed that the returned MIME type exists and can be recognized by applications. Some combination of format and filter seldom exists in application, so this function can only generate the string based on some non-standard rules.
- GnomeAutoar.format_get_description(format)¶
- Parameters:
format (
GnomeAutoar.Format
) – anGnomeAutoar.Format
- Returns:
description about the format
- Return type:
Gets description of the format from the internal static data.
- GnomeAutoar.format_get_description_libarchive(format)¶
- Parameters:
format (
GnomeAutoar.Format
) – anGnomeAutoar.Format
- Returns:
description about the format. Free the returned string with
GLib.free
().- Return type:
Gets description of the format from libarchive. This function creates and destroys an archive object in order to get the description string.
- GnomeAutoar.format_get_extension(format)¶
- Parameters:
format (
GnomeAutoar.Format
) – anGnomeAutoar.Format
- Returns:
a file name extension
- Return type:
Gets the file name extension of the format from the internal static data.
- GnomeAutoar.format_get_format_libarchive(format)¶
- Parameters:
format (
GnomeAutoar.Format
) – anGnomeAutoar.Format
- Returns:
an integer
- Return type:
Gets the format code used by libarchive. You can use the return value as the argument for archive_read_support_format_by_code() and archive_write_set_format(). However, some format cannot be set using these two functions because of problems inside libarchive. Use autoar_format_get_libarchive_read() and autoar_format_get_libarchive_write() to get the function pointer is the more reliable way to set format on the archive object.
- GnomeAutoar.format_get_mime_type(format)¶
- Parameters:
format (
GnomeAutoar.Format
) – anGnomeAutoar.Format
- Returns:
an MIME type
- Return type:
Gets the MIME type of the format from the internal static data.
- GnomeAutoar.format_is_valid(format)¶
- Parameters:
format (
GnomeAutoar.Format
) – anGnomeAutoar.Format
- Returns:
True
if the value of format is valid- Return type:
Checks whether an
GnomeAutoar.Format
is valid.
- GnomeAutoar.format_last()¶
- Returns:
maximal allowed values of
GnomeAutoar.Format
- Return type:
Gets the maximal allowed values of
GnomeAutoar.Format
- GnomeAutoar.libarchive_quark()¶
- Returns:
a #GQuark.
- Return type:
Gets the libarchive Error Quark.
- GnomeAutoar.query_mime_type_supported(file)¶
- Parameters:
file (
Gio.File
) – aGio.File
to check if its mime type is supported- Returns:
- Return type:
This function will query the file’s mime type and then call
GnomeAutoar.check_mime_type_supported
(), so it does blocking IO.