## FmFileInfoJob FmFileInfoJob — Job to gather information about files. |

## Synopsis

    struct              FmFileInfoJob;
    struct              FmFileInfoJobClass;
    enum                FmFileInfoJobFlags;
    void                fm_file_info_job_add                (FmFileInfoJob *job,
                                                             FmPath *path);
    void                fm_file_info_job_add_gfile          (FmFileInfoJob *job,
                                                             GFile *gf);
    FmPath *            fm_file_info_job_get_current        (FmFileInfoJob *job);
    FmFileInfoJob *     fm_file_info_job_new                (FmPathList *files_to_query,
                                                             FmFileInfoJobFlags flags);

## Object Hierarchy

      GObject
       +----FmJob
             +----FmFileInfoJob

## Signals

      "got-info"                                       : Run Last

## Description

`include`: libfm/fm.h

The FmFileInfoJob can be used to get filled FmFileInfo for some files.

## Details

### struct FmFileInfoJob

    struct FmFileInfoJob {
        FmJob parent;
        FmFileInfoJobFlags flags;
        FmFileInfoList* file_infos;
    };

FmJob `parent`; | the parent object
FmFileInfoJobFlags `flags`; | flags for the job
FmFileInfoList *`file_infos`; | gathered data

### struct FmFileInfoJobClass

    struct FmFileInfoJobClass {
        void (*got_info)(FmFileInfoJob *job, FmFileInfo *info);
    };

`got_info` () | the class closure for the "got-info" signal.

### enum FmFileInfoJobFlags

    typedef enum {
        FM_FILE_INFO_JOB_NONE = 0,
        FM_FILE_INFO_JOB_FOLLOW_SYMLINK = 1 << 0, /* FIXME: not yet implemented */
        FM_FILE_INFO_JOB_EMIT_FOR_EACH_FILE = 1 << 1
    } FmFileInfoJobFlags;

`FM_FILE_INFO_JOB_NONE` | default
`FM_FILE_INFO_JOB_FOLLOW_SYMLINK` | not yet implemented
`FM_FILE_INFO_JOB_EMIT_FOR_EACH_FILE` | emit "got-info" for each file

### fm_file_info_job_add ()

    void                fm_file_info_job_add                (FmFileInfoJob *job,
                                                             FmPath *path);

Adds a `path` to query list for the `job`.

This API may only be called before starting the `job`.

`job` : | a job to add file
`path` : | a path to add to query list

Since 0.1.0

### fm_file_info_job_add_gfile ()

    void                fm_file_info_job_add_gfile          (FmFileInfoJob *job,
                                                             GFile *gf);

Adds a path `gf` to query list for the `job`.

This API may only be called before starting the `job`.

`job` : | a job to add file
`gf` : | a file descriptor to add to query list

Since 0.1.0

### fm_file_info_job_get_current ()

    FmPath *            fm_file_info_job_get_current        (FmFileInfoJob *job);

Retrieves current the FmPath which caused the error. Returned data are owned by `job` and shouldn't be freed by caller.

This API may only be called in error handler.

`job` : | the job to inspect
Returns : | the current processing file path. [transfer none]

Since 0.1.10

### fm_file_info_job_new ()

    FmFileInfoJob *     fm_file_info_job_new                (FmPathList *files_to_query,
                                                             FmFileInfoJobFlags flags);

Creates a new FmFileInfoJob which can be used by FmJob API.

`files_to_query` : | list of paths to query informatiom. [allow-none]
`flags` : | modificators of query mode
Returns : | a new FmFileInfoJob object. [transfer full]

Since 0.1.0

## Signal Details

### The `"got-info"` signal

    void                user_function                      (FmFileInfoJob *fmfileinfojob,
                                                            gpointer       arg1,
                                                            gpointer       user_data)          : Run Last