1 /* LIBGIMP - The GIMP Library 2 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball 3 * 4 * Datafiles module copyight (C) 1996 Federico Mena Quintero 5 * federico@nuclecu.unam.mx 6 * 7 * This library is free software: you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 3 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library. If not, see 19 * <https://www.gnu.org/licenses/>. 20 */ 21 22 #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) 23 #error "Only <libgimpbase/gimpbase.h> can be included directly." 24 #endif 25 26 #ifndef __GIMP_DATAFILES_H__ 27 #define __GIMP_DATAFILES_H__ 28 29 #include <time.h> 30 31 G_BEGIN_DECLS 32 33 34 /** 35 * GimpDatafileData: 36 * @filename: the data file's full path. 37 * @dirname: the folder the data file is in. 38 * @basename: the data file's basename. 39 * @atime: the last time the file was accessed for reading. 40 * @mtime: the last time the file was modified. 41 * @ctime: the time the file was created. 42 * 43 * This structure is passed to the #GimpDatafileLoaderFunc given to 44 * gimp_datafiles_read_directories() for each file encountered in the 45 * data path. 46 **/ 47 struct _GimpDatafileData 48 { 49 const gchar *filename; 50 const gchar *dirname; 51 const gchar *basename; 52 53 time_t atime; 54 time_t mtime; 55 time_t ctime; 56 }; 57 58 59 GIMP_DEPRECATED 60 gboolean gimp_datafiles_check_extension (const gchar *filename, 61 const gchar *extension); 62 63 GIMP_DEPRECATED_FOR(GFileEnumerator) 64 void gimp_datafiles_read_directories (const gchar *path_str, 65 GFileTest flags, 66 GimpDatafileLoaderFunc loader_func, 67 gpointer user_data); 68 69 70 G_END_DECLS 71 72 #endif /* __GIMP_DATAFILES_H__ */ 73