1 module deimos.git2.tree; 2 3 import deimos.git2.common; 4 import deimos.git2.object_; 5 import deimos.git2.oid; 6 import deimos.git2.util; 7 import deimos.git2.types; 8 9 extern (C): 10 11 int git_tree_lookup( 12 git_tree **out_, git_repository *repo, const(git_oid)* id); 13 int git_tree_lookup_prefix( 14 git_tree **out_, 15 git_repository *repo, 16 const(git_oid)* id, 17 size_t len); 18 void git_tree_free(git_tree *tree); 19 const(git_oid)* git_tree_id(const(git_tree)* tree); 20 git_repository * git_tree_owner(const(git_tree)* tree); 21 size_t git_tree_entrycount(const(git_tree)* tree); 22 const(git_tree_entry)* git_tree_entry_byname( 23 const(git_tree)* tree, const(char)* filename); 24 const(git_tree_entry)* git_tree_entry_byindex( 25 const(git_tree)* tree, size_t idx); 26 const(git_tree_entry)* git_tree_entry_byoid( 27 const(git_tree)* tree, const(git_oid)* oid); 28 int git_tree_entry_bypath( 29 git_tree_entry **out_, 30 const(git_tree)* root, 31 const(char)* path); 32 git_tree_entry * git_tree_entry_dup(const(git_tree_entry)* entry); 33 void git_tree_entry_free(git_tree_entry *entry); 34 const(char)* git_tree_entry_name(const(git_tree_entry)* entry); 35 const(git_oid)* git_tree_entry_id(const(git_tree_entry)* entry); 36 git_otype git_tree_entry_type(const(git_tree_entry)* entry); 37 git_filemode_t git_tree_entry_filemode(const(git_tree_entry)* entry); 38 git_filemode_t git_tree_entry_filemode_raw(const(git_tree_entry)* entry); 39 int git_tree_entry_cmp(const(git_tree_entry)* e1, const(git_tree_entry)* e2); 40 int git_tree_entry_to_object( 41 git_object **object_out, 42 git_repository *repo, 43 const(git_tree_entry)* entry); 44 int git_treebuilder_create( 45 git_treebuilder **out_, const(git_tree)* source); 46 void git_treebuilder_clear(git_treebuilder *bld); 47 uint git_treebuilder_entrycount(git_treebuilder *bld); 48 void git_treebuilder_free(git_treebuilder *bld); 49 const(git_tree_entry)* git_treebuilder_get( 50 git_treebuilder *bld, const(char)* filename); 51 int git_treebuilder_insert( 52 const(git_tree_entry)* *out_, 53 git_treebuilder *bld, 54 const(char)* filename, 55 const(git_oid)* id, 56 git_filemode_t filemode); 57 int git_treebuilder_remove( 58 git_treebuilder *bld, const(char)* filename); 59 60 alias git_treebuilder_filter_cb = int function( 61 const(git_tree_entry)* entry, void *payload); 62 63 void git_treebuilder_filter( 64 git_treebuilder *bld, 65 git_treebuilder_filter_cb filter, 66 void *payload); 67 int git_treebuilder_write( 68 git_oid *id, git_repository *repo, git_treebuilder *bld); 69 70 alias git_treewalk_cb = int function( 71 const(char)* root, const(git_tree_entry)* entry, void *payload); 72 73 enum git_treewalk_mode { 74 GIT_TREEWALK_PRE = 0, 75 GIT_TREEWALK_POST = 1, 76 } 77 mixin _ExportEnumMembers!git_treewalk_mode; 78 79 int git_tree_walk( 80 const(git_tree)* tree, 81 git_treewalk_mode mode, 82 git_treewalk_cb callback, 83 void *payload);