## GdaDataModelDir GdaDataModelDir — GdaDataModel to list files in filesystem |

## Synopsis

                        GdaDataModelDir;
                        GdaDataModelDirClass;
                        GdaDataModelDirPrivate;
    GdaDataModel *      gda_data_model_dir_new              (const gchar *basedir);
    const GSList *      gda_data_model_dir_get_errors       (GdaDataModelDir *model);
    void                gda_data_model_dir_clean_errors     (GdaDataModelDir *model);

## Object Hierarchy

      GObject
       +----GdaDataModelDir

## Implemented Interfaces

GdaDataModelDir implements GdaDataModel.

## Properties

      "basedir"                  gchar*                : Read / Write / Construct Only

## Description

The GdaDataModelDir object lists files on a filesystem which are located below a "basedir" directory, one file per row. The data model has the folllowing columns:

- the "dir_name" column (G_TYPE_STRING): contains the dirname part of the file

- the "file_name" column (G_TYPE_STRING): contains the file name part of the file

- the "size" column (G_TYPE_UINT): contains the size in bytes of the file

- the "mime_type" column (G_TYPE_STRING): contains the mime type of the file (if GnomeVFS has been found, and NULL otherwise)

- the "md5sum" column (G_TYPE_STRING): contains the MD5 hash of each file (if LibGCrypt has been found, and NULL otherwise)

- the "data" column (GDA_TYPE_BLOB): contains the contents of each file

Note that the actual values of the "mime_type", "md5sum" and "data" columns are computed only when they are requested to help with performances.

## Details

### GdaDataModelDir

    typedef struct _GdaDataModelDir GdaDataModelDir;

### GdaDataModelDirClass

    typedef struct {
    	GObjectClass            parent_class;

    	/* Padding for future expansion */
    	void (*_gda_reserved1) (void);
    	void (*_gda_reserved2) (void);
    	void (*_gda_reserved3) (void);
    	void (*_gda_reserved4) (void);
    } GdaDataModelDirClass;

### GdaDataModelDirPrivate

    typedef struct _GdaDataModelDirPrivate GdaDataModelDirPrivate;

### gda_data_model_dir_new ()

    GdaDataModel *      gda_data_model_dir_new              (const gchar *basedir);

Creates a new GdaDataModel object to list all the files starting from `basedir`

`basedir` : | a directory
Returns : | a new GdaDataModel

### gda_data_model_dir_get_errors ()

    const GSList *      gda_data_model_dir_get_errors       (GdaDataModelDir *model);

Get the list of errors which have occurred while using `model`

`model` : | a GdaDataModelDir object
Returns : | a read-only list of GError pointers, or `NULL` if no error has occurred

### gda_data_model_dir_clean_errors ()

    void                gda_data_model_dir_clean_errors     (GdaDataModelDir *model);

Reset the list of errors which have occurred while using `model`

`model` : | a GdaDataModelDir object

## Property Details

### The `"basedir"` property

      "basedir"                  gchar*                : Read / Write / Construct Only

Base directory.

Default value: NULL