* add mu_util_guess_mu_homedir and mu_util_guess_xapian_dir and use them

This commit is contained in:
Dirk-Jan C. Binnema
2010-11-02 21:12:18 +02:00
parent d112c2c930
commit 3b87a0f9e6
3 changed files with 58 additions and 22 deletions

View File

@ -51,6 +51,30 @@ char* mu_util_dir_expand (const char* path) G_GNUC_WARN_UNUSED_RESULT;
char* mu_util_guess_maildir (void) G_GNUC_WARN_UNUSED_RESULT;
/**
* guess the place of the mu homedir (typically, ~/.mu). Note, this
* directory does not necessarily exist. mu_util_check_dir can be use
* to check that
*
* @return the guessed mu homedir, which needs to be freed with g_free
* when no longer needed.
*/
gchar* mu_util_guess_mu_homedir (void);
/**
* guess the place of the xapian database (typically,
* ~/.mu/xapian/). Note, this directory does not necessarily
* exist. mu_util_check_dir can be use to check that
*
* @param muhome the mu home directory or NULL, in which the muhome
* directoy will be guessed as well
*
* @return the guessed xapian dir, which needs to be freed with g_free
* when no longer needed.
*/
gchar* mu_util_guess_xapian_dir (const gchar *muhome);
/**
* if path exists, check that's a read/writeable dir; otherwise try to