OSTree Manual | ||||
---|---|---|---|---|
Top | Description |
In-memory modifiable filesystem treeIn-memory modifiable filesystem tree — Modifiable filesystem tree |
Synopsis
typedef OstreeMutableTree; OstreeMutableTree * ostree_mutable_tree_new (void
); void ostree_mutable_tree_set_metadata_checksum (OstreeMutableTree *self
,const char *checksum
); const char * ostree_mutable_tree_get_metadata_checksum (OstreeMutableTree *self
); void ostree_mutable_tree_set_contents_checksum (OstreeMutableTree *self
,const char *checksum
); const char * ostree_mutable_tree_get_contents_checksum (OstreeMutableTree *self
); gboolean ostree_mutable_tree_replace_file (OstreeMutableTree *self
,const char *name
,const char *checksum
,GError **error
); gboolean ostree_mutable_tree_ensure_dir (OstreeMutableTree *self
,const char *name
,OstreeMutableTree **out_subdir
,GError **error
); gboolean ostree_mutable_tree_lookup (OstreeMutableTree *self
,const char *name
,char **out_file_checksum
,OstreeMutableTree **out_subdir
,GError **error
); gboolean ostree_mutable_tree_ensure_parent_dirs (OstreeMutableTree *self
,GPtrArray *split_path
,const char *metadata_checksum
,OstreeMutableTree **out_parent
,GError **error
); gboolean ostree_mutable_tree_walk (OstreeMutableTree *self
,GPtrArray *split_path
,guint start
,OstreeMutableTree **out_subdir
,GError **error
); GHashTable * ostree_mutable_tree_get_subdirs (OstreeMutableTree *self
); GHashTable * ostree_mutable_tree_get_files (OstreeMutableTree *self
);
Description
In order to commit content into an OstreeRepo, it must first be imported into an OstreeMutableTree. There are several high level APIs to create an initiable OstreeMutableTree from a physical filesystem directory, but they may also be computed programmatically.
Details
ostree_mutable_tree_new ()
OstreeMutableTree * ostree_mutable_tree_new (void
);
Returns : |
A new tree. [transfer full] |
ostree_mutable_tree_set_metadata_checksum ()
void ostree_mutable_tree_set_metadata_checksum (OstreeMutableTree *self
,const char *checksum
);
ostree_mutable_tree_get_metadata_checksum ()
const char * ostree_mutable_tree_get_metadata_checksum
(OstreeMutableTree *self
);
ostree_mutable_tree_set_contents_checksum ()
void ostree_mutable_tree_set_contents_checksum (OstreeMutableTree *self
,const char *checksum
);
ostree_mutable_tree_get_contents_checksum ()
const char * ostree_mutable_tree_get_contents_checksum
(OstreeMutableTree *self
);
ostree_mutable_tree_replace_file ()
gboolean ostree_mutable_tree_replace_file (OstreeMutableTree *self
,const char *name
,const char *checksum
,GError **error
);
ostree_mutable_tree_ensure_dir ()
gboolean ostree_mutable_tree_ensure_dir (OstreeMutableTree *self
,const char *name
,OstreeMutableTree **out_subdir
,GError **error
);
ostree_mutable_tree_lookup ()
gboolean ostree_mutable_tree_lookup (OstreeMutableTree *self
,const char *name
,char **out_file_checksum
,OstreeMutableTree **out_subdir
,GError **error
);
ostree_mutable_tree_ensure_parent_dirs ()
gboolean ostree_mutable_tree_ensure_parent_dirs (OstreeMutableTree *self
,GPtrArray *split_path
,const char *metadata_checksum
,OstreeMutableTree **out_parent
,GError **error
);
Create all parent trees necessary for the given split_path
to
exist.
|
Tree |
|
File path components. [element-type utf8] |
|
SHA256 checksum for metadata |
|
The parent tree. [out][transfer full] |
|
a GError |
ostree_mutable_tree_walk ()
gboolean ostree_mutable_tree_walk (OstreeMutableTree *self
,GPtrArray *split_path
,guint start
,OstreeMutableTree **out_subdir
,GError **error
);
Traverse start
number of elements starting from split_path
; the
child will be returned in out_subdir
.
|
Tree |
|
Split pathname. [element-type utf8] |
|
Descend from this number of elements in split_path
|
|
Target parent. [out][transfer full] |
|
Error |
ostree_mutable_tree_get_subdirs ()
GHashTable * ostree_mutable_tree_get_subdirs (OstreeMutableTree *self
);
Returns : |
All children directories. [transfer none][element-type utf8 OstreeMutableTree] |
ostree_mutable_tree_get_files ()
GHashTable * ostree_mutable_tree_get_files (OstreeMutableTree *self
);
Returns : |
All children files (the value is a checksum). [transfer none][element-type utf8 utf8] |