ostree-repo-file: OSTree API references

## ostree-repo-file ostree-repo-file |

## Functions

gboolean | ostree_repo_file_ensure_resolved ()
gboolean | ostree_repo_file_get_xattrs ()
OstreeRepo * | ostree_repo_file_get_repo ()
OstreeRepoFile * | ostree_repo_file_get_root ()
void | ostree_repo_file_tree_set_metadata ()
const char * | ostree_repo_file_tree_get_contents_checksum ()
const char * | ostree_repo_file_tree_get_metadata_checksum ()
GVariant * | ostree_repo_file_tree_get_contents ()
GVariant * | ostree_repo_file_tree_get_metadata ()
const char * | ostree_repo_file_get_checksum ()
int | ostree_repo_file_tree_find_child ()
gboolean | ostree_repo_file_tree_query_child ()

## Types and Values

typedef | OstreeRepoFile

## Description

## Functions

### ostree_repo_file_ensure_resolved ()

    gboolean
    ostree_repo_file_ensure_resolved (OstreeRepoFile *self,
                                      GError **error);

Ensure that the backing metadata is loaded.

#### Parameters

self | A repo file |
error | Error |

#### Returns

`FALSE` if the operation failed, `TRUE` otherwise

### ostree_repo_file_get_xattrs ()

    gboolean
    ostree_repo_file_get_xattrs (OstreeRepoFile *self,
                                 GVariant **out_xattrs,
                                 GCancellable *cancellable,
                                 GError **error);

#### Parameters

self | OstreeRepoFile |
out_xattrs | the extended attributes. | [out][optional]
cancellable | Cancellable |
error | Error |

### ostree_repo_file_get_repo ()

    OstreeRepo *
    ostree_repo_file_get_repo (OstreeRepoFile *self);

#### Returns

Repository.

[transfer none]

### ostree_repo_file_get_root ()

    OstreeRepoFile *
    ostree_repo_file_get_root (OstreeRepoFile *self);

#### Returns

The root directory for the commit referenced by this file.

[transfer none]

### ostree_repo_file_tree_set_metadata ()

    void
    ostree_repo_file_tree_set_metadata (OstreeRepoFile *self,
                                        const char *checksum,
                                        GVariant *metadata);

Replace the metadata checksum and metadata object.

#### Parameters

self | A repo file |

### ostree_repo_file_tree_get_contents_checksum ()

    const char *
    ostree_repo_file_tree_get_contents_checksum
                                   (OstreeRepoFile *self);

#### Parameters

self | A repo file |

#### Returns

The SHA256 digest of the content object, or `NULL` if this is not a directory.

[nullable]

### ostree_repo_file_tree_get_metadata_checksum ()

    const char *
    ostree_repo_file_tree_get_metadata_checksum
                                   (OstreeRepoFile *self);

#### Parameters

self | A repo file |

#### Returns

The SHA256 digest of the metadata object, or `NULL` if this is not a directory.

[nullable]

### ostree_repo_file_tree_get_contents ()

    GVariant *
    ostree_repo_file_tree_get_contents (OstreeRepoFile *self);

This API will return `NULL` if the file is not "resolved" i.e. in a loaded state. It will also return `NULL` if this path is not a directory tree.

#### Parameters

self | A repo file |

#### Returns

The GVariant representing the children of this directory.

[nullable]

### ostree_repo_file_tree_get_metadata ()

    GVariant *
    ostree_repo_file_tree_get_metadata (OstreeRepoFile *self);

This API will return `NULL` if the file is not "resolved" i.e. in a loaded state. It will also return `NULL` if this path is not a directory tree.

#### Parameters

self | A repo file |

#### Returns

The GVariant representing the metadata for this directory.

[nullable]

### ostree_repo_file_get_checksum ()

    const char *
    ostree_repo_file_get_checksum (OstreeRepoFile *self);

### ostree_repo_file_tree_find_child ()

    int
    ostree_repo_file_tree_find_child (OstreeRepoFile *self,
                                      const char *name,
                                      gboolean *is_dir,
                                      GVariant **out_container);

#### Parameters

self | OstreeRepoFile |
name | name of the child |
is_dir | . | [out caller-allocates]
out_container | . | [out]

### ostree_repo_file_tree_query_child ()

    gboolean
    ostree_repo_file_tree_query_child (OstreeRepoFile *self,
                                       int n,
                                       const char *attributes,
                                       GFileQueryInfoFlags flags,
                                       GFileInfo **out_info,
                                       GCancellable *cancellable,
                                       GError **error);

#### Parameters

self | OstreeRepoFile |
n | the child number |
attributes | an attribute string to match, see `g_file_attribute_matcher_new()` |
flags | a GFileQueryInfoFlags |
out_info | the GFileInfo of the child. | [out][transfer full][optional]
cancellable | a GCancellable or `NULL` |
error | a GError or `NULL` |

#### Returns

`TRUE` on success and the `out_info` is set, `FALSE` otherwise.

## Types and Values

### OstreeRepoFile

    typedef struct OstreeRepoFile OstreeRepoFile;