#include #include gint main (gint argc, gchar **argv) { GFile *file; GFileInfo *info; const gchar *content_type; gboolean executable; file = g_file_new_for_path (argv[1]); info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, G_FILE_QUERY_INFO_NONE, NULL, NULL); content_type = g_file_info_get_content_type (info); executable = g_content_type_can_be_executable (content_type); printf ("%s: %d\n", content_type, executable); return 0; }