TODO: It would be better to cache this rather than query * the file system every time the output name changes */
| 804 | /* TODO: It would be better to cache this rather than query |
| 805 | * the file system every time the output name changes */ |
| 806 | static GDateTime * |
| 807 | get_file_modification_date_time (const char *filename) |
| 808 | { |
| 809 | GFile *file; |
| 810 | GFileInfo *info; |
| 811 | GDateTime *datetime = NULL; |
| 812 | |
| 813 | file = g_file_new_for_path(filename); |
| 814 | info = g_file_query_info(file, G_FILE_ATTRIBUTE_TIME_MODIFIED, |
| 815 | G_FILE_QUERY_INFO_NONE, NULL, NULL); |
| 816 | |
| 817 | if (info != NULL) |
| 818 | { |
| 819 | datetime = g_file_info_get_modification_date_time(info); |
| 820 | g_object_unref(info); |
| 821 | } |
| 822 | g_object_unref(file); |
| 823 | return datetime; |
| 824 | } |
| 825 | |
| 826 | static char * |
| 827 | get_file_modification_date (const char *filename) |
no outgoing calls
no test coverage detected