diff options
| author | David Bremner <david@tethera.net> | 2026-01-25 07:56:35 +0900 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2026-02-16 07:24:18 +0900 |
| commit | c8fcc953b5481e96d698c148325563890848c5ff (patch) | |
| tree | 628fb661213369c6d1abc94da9b5d64289177689 /util/path-util.h | |
| parent | b222d18634e95b54010cec02e994d3cc96755746 (diff) | |
util: refactor sync_dir and mkdir_recursive
Moving these functions to libnotmuch_util will allow re-use from
either multiple CLI compilation units or from the library. To avoid
future surprises, replace printing to stderr with the usual status
string mechanism.
Diffstat (limited to 'util/path-util.h')
| -rw-r--r-- | util/path-util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/path-util.h b/util/path-util.h index ac85f696..4cbbbf1d 100644 --- a/util/path-util.h +++ b/util/path-util.h @@ -5,6 +5,9 @@ #ifndef NOTMUCH_UTIL_PATH_UTIL_H_ #define NOTMUCH_UTIL_PATH_UTIL_H_ +/* For notmuch_status_t */ +#include "notmuch.h" + #ifdef __cplusplus extern "C" { #endif @@ -12,6 +15,12 @@ extern "C" { char * notmuch_canonicalize_file_name (const char *path); +notmuch_status_t +mkdir_recursive (const void *ctx, const char *path, int mode, char **status_string); + +notmuch_status_t +sync_dir (const char *path, char **status_string); + #ifdef __cplusplus } #endif |
