2 * This file is part of GtkHotkey.
3 * Copyright Mikkel Kamstrup Erlandsen, March, 2008
5 * GtkHotkey is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GtkHotkey is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with GtkHotkey. If not, see <http://www.gnu.org/licenses/>.
24 gtk_hotkey_g_file_get_type (GFile
*file
)
30 g_return_val_if_fail (G_IS_FILE(file
), G_FILE_TYPE_UNKNOWN
);
32 if (!g_file_query_exists(file
, NULL
))
33 return G_FILE_TYPE_UNKNOWN
;
35 g_return_val_if_fail (G_IS_FILE(file
), G_FILE_TYPE_UNKNOWN
);
37 info
= g_file_query_info (file
, G_FILE_ATTRIBUTE_STANDARD_TYPE
,
41 g_critical ("Failed to create GFileInfo: %s", error
->message
);
43 return G_FILE_TYPE_UNKNOWN
;
46 type
= g_file_info_get_file_type (info
);
47 g_object_unref (info
);