First you initialize transaction using ta_initialize(), then you will build transaction using ta_[on_finalize]_[on_rollback]() functions. And finally you will call ta_finalize() or ta_rollback() to end transaction.
Defines | |
| #define | TA_ACTIVE E(0) |
| Another transaction is still active. | |
| #define | TA_NACTIVE E(1) |
| Transaction is not active. | |
Functions | |
| gint | ta_initialize (gboolean dryrun, struct error *e) |
| Initialize transaction. | |
| gint | ta_finalize () |
| Finalize current transaction. | |
| gint | ta_rollback () |
| Rollback current transaction. | |
| void | ta_keep_remove (gchar *path, gboolean is_dir) |
| Keep file on finalize, remove on rollback. | |
| void | ta_move_remove (gchar *path, gchar *dst_path) |
| Rename file on finalize, remove on rollback. | |
| void | ta_link_nothing (gchar *path, gchar *tgt_path) |
| Create hardlink on finalize, do nothing on rollback. | |
| void | ta_forcelink_nothing (gchar *path, gchar *tgt_path) |
| Forcibly create hardlink on finalize, do nothing on rollback. | |
| void | ta_symlink_nothing (gchar *path, gchar *tgt_path) |
| Create symlink on finalize, do nothing on rollback. | |
| void | ta_forcesymlink_nothing (gchar *path, gchar *tgt_path) |
| Forcibly create symlink on finalize, do nothing on rollback. | |
| void | ta_chperm_nothing (gchar *path, gint mode, gint owner, gint group) |
| Change permissions on finalize, do nothing on rollback. | |
| void | ta_remove_nothing (gchar *path, gint is_dir) |
| Remove file/directory on finalize, do nothing on rollback. | |