1 #ifndef SYNC_STATUS_TREE_H 2 #define SYNC_STATUS_TREE_H 3 4 struct SyncStatusTree; 5 6 struct SyncStatusTree * 7 sync_status_tree_new (const char *worktree); 8 9 void 10 sync_status_tree_free (struct SyncStatusTree *tree); 11 12 /* 13 * Add a @path into the @tree. If any directory along the path is missing, 14 * it will be created. If the path already exists, it won't be overwritten. 15 */ 16 void 17 sync_status_tree_add (struct SyncStatusTree *tree, 18 const char *path, 19 int mode, 20 gboolean refresh); 21 22 /* 23 * Delete a path from the tree. If directory becomes empty after the deletion, 24 * it will be deleted too. All empty direcotries along the path will be deleted. 25 */ 26 void 27 sync_status_tree_del (struct SyncStatusTree *tree, 28 const char *path); 29 30 int 31 sync_status_tree_exists (struct SyncStatusTree *tree, 32 const char *path); 33 34 #endif 35