## gimpdatafiles

gimpdatafiles — Functions to handle GIMP data files.

## Synopsis

                        GimpDatafileData;
    void                (*GimpDatafileLoaderFunc)           (const GimpDatafileData *file_data,
                                                             gpointer user_data);
    gboolean            gimp_datafiles_check_extension      (const gchar *filename,
                                                             const gchar *extension);
    void                gimp_datafiles_read_directories     (const gchar *path_str,
                                                             GFileTest flags,
                                                             GimpDatafileLoaderFunc loader_func,
                                                             gpointer user_data);

## Description

Functions to handle GIMP data files.

## Details

### GimpDatafileData

    typedef struct {
      const gchar *filename;
      const gchar *dirname;
      const gchar *basename;

      time_t       atime;
      time_t       mtime;
      time_t       ctime;
    } GimpDatafileData;

This structure is passed to the GimpDatafileLoaderFunc given to `gimp_datafiles_read_directories()` for each file encountered in the data path.

const gchar *`filename`; | the data file's full path.
const gchar *`dirname`; | the folder the data file is is.
const gchar *`basename`; | the data file's basename.
time_t `atime`; | the last time the file was accessed for reading.
time_t `mtime`; | the last time the file was modified.
time_t `ctime`; | the time the file was created.

### GimpDatafileLoaderFunc ()

    void                (*GimpDatafileLoaderFunc)           (const GimpDatafileData *file_data,
                                                             gpointer user_data);

### gimp_datafiles_check_extension ()

    gboolean            gimp_datafiles_check_extension      (const gchar *filename,
                                                             const gchar *extension);

### gimp_datafiles_read_directories ()

    void                gimp_datafiles_read_directories     (const gchar *path_str,
                                                             GFileTest flags,
                                                             GimpDatafileLoaderFunc loader_func,
                                                             gpointer user_data);