OstreeMutableTree: add _remove method

There is no API method to remove a file or subdirectory from a MutableTree
besides directly manipulating the GHashTable returned by _get_files or
_get_subdirs. This isn't possible from an introspection binding that transforms
the returned GHashTable, and may also leave the tree checksum in an invalid
state. Introduce a new method so that removing files or subdirectories is
safe, and possible from bindings.

Closes: #1724
Approved by: jlebon
This commit is contained in:
Robert McQueen authored and Atomic Bot committed 2018-09-20 17:49:55 +00:00
1 parent 6b37fe8310
commit b32c9e0df9
4 files changed
+53

No files matched your search

+1
View File
@@ -257,6 +257,7 @@ ostree_mutable_tree_get_metadata_checksum
ostree_mutable_tree_set_contents_checksum
ostree_mutable_tree_get_contents_checksum
ostree_mutable_tree_replace_file
ostree_mutable_tree_remove
ostree_mutable_tree_ensure_dir
ostree_mutable_tree_lookup
ostree_mutable_tree_ensure_parent_dirs