## Infile reading structed files Infile reading structed files |

## Functions

int | gsf_infile_num_children ()
GsfInput * | gsf_infile_child_by_index ()
GsfInput * | gsf_infile_child_by_name ()
GsfInput * | gsf_infile_child_by_vname ()
GsfInput * | gsf_infile_child_by_aname ()
GsfInput * | gsf_infile_child_by_vaname ()
char const * | gsf_infile_name_by_index ()

## Types and Values

| GsfInfile

## Object Hierarchy

        GObject
        ╰── GsfInput
            ╰── GsfInfile
                ├── GsfInfileMSOle
                ├── GsfInfileStdio
                ├── GsfInfileTar
                ├── GsfInfileZip
                ╰── GsfStructuredBlob

## Description

## Functions

### gsf_infile_num_children ()

    int
    gsf_infile_num_children (GsfInfile *infile);

#### Parameters

infile | the structured storage |

#### Returns

the number of children the storage has, or -1 if the storage can not have children.

### gsf_infile_child_by_index ()

    GsfInput *
    gsf_infile_child_by_index (GsfInfile *infile,
                               int i);

TODO : For 2.0 api will change to include a GError.

#### Parameters

infile | GsfInfile |
i | target index |

#### Returns

a newly created child which must be unrefed.

[transfer full]

### gsf_infile_child_by_name ()

    GsfInput *
    gsf_infile_child_by_name (GsfInfile *infile,
                              char const *name);

The function returns a named child of the given infile. This only works for an immediate child. If you need to go several levels down use gsf_infile_child_by_aname, for example.

TODO : For 2.0 api will change to include a GError.

#### Parameters

infile | GsfInfile |
name | target name |

#### Returns

a newly created child which must be unrefed.

[transfer full]

### gsf_infile_child_by_vname ()

    GsfInput *
    gsf_infile_child_by_vname (GsfInfile *infile,
                               ...);

Apart from the way arguments are specified, this is the same as gsf_infile_child_by_aname. Please see the documentation there.

#### Parameters

infile | a GsfInfile |
... | A `NULL` terminated list of names |

#### Returns

a newly created child which must be unrefed.

[transfer full]

### gsf_infile_child_by_aname ()

    GsfInput *
    gsf_infile_child_by_aname (GsfInfile *infile,
                               char const *names[]);

This function finds a child that is several directory levels down the tree. If, for example, the names "foo", "bar", and "baz" are given, then this function first finds the "foo" directory in the root infile, then locates "bar" within that directory, and finally locates "baz" within that and returns the "baz" child. In other words, this function finds the "foo/bar/baz" child.

New in 1.14.9.

#### Parameters

infile | GsfInfile |
names | A `NULL` terminated array of names (e.g. from g_strsplit). | [array zero-terminated=1]

#### Returns

a newly created child which must be unrefed.

[transfer full]

### gsf_infile_child_by_vaname ()

    GsfInput *
    gsf_infile_child_by_vaname (GsfInfile *infile,
                                va_list names);

Apart from argument types, this is the same as gsf_infile_child_by_aname. Please see the documentation there. New in 1.14.9.

#### Parameters

infile | GsfInfile |
names | A `NULL` terminated array of names (e.g. from g_strsplit) |

#### Returns

a newly created child which must be unrefed.

[transfer full]

### gsf_infile_name_by_index ()

    char const *
    gsf_infile_name_by_index (GsfInfile *infile,
                              int i);

#### Parameters

infile | An GsfInfile |
i | zero-based index of child to find. |

#### Returns

the utf8 encoded name of the `i` -th child.

[transfer none][nullable]

## Types and Values

### GsfInfile

    typedef struct _GsfInfile GsfInfile;

Class representing an input file.