FmFileInfoJob: Libfm Reference Manual

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

## Functions

void | fm_file_info_job_add ()
void | fm_file_info_job_add_gfile ()
FmPath * | fm_file_info_job_get_current ()
FmFileInfoJob * | fm_file_info_job_new ()

## Signals

void | got-info | Run Last

## Types and Values

struct | FmFileInfoJob
struct | FmFileInfoJobClass
enum | FmFileInfoJobFlags

## Object Hierarchy

        GObject
        ╰── FmJob
            ╰── FmFileInfoJob

## Description

`include` : libfm/fm.h

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

## Functions

### 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` .

#### Parameters

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` .

#### Parameters

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.

#### Parameters

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.

#### Parameters

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

## Types and Values

### struct FmFileInfoJob

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

#### Members

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);
    };

#### Members

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

### enum FmFileInfoJobFlags

#### Members

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 |

## Signal Details

### The `“got-info”` signal

    void
    user_function (FmFileInfoJob *fmfileinfojob,
                   gpointer       arg1,
                   gpointer       user_data)

Flags: Run Last