* add mu_util_create_dir_maybe

to create a dir if it does not exist yet; if it does exist, make sure it's a
  read-writeable dir
This commit is contained in:
Dirk-Jan C. Binnema
2010-01-04 20:15:49 +02:00
parent 737754c03e
commit 16c305fcc3
2 changed files with 42 additions and 1 deletions

View File

@ -45,6 +45,18 @@ char* mu_util_dir_expand (const char* path);
char* mu_util_guess_maildir (void);
/**
* if path exists, check that's a read/writeable dir; otherwise try to
* create it (with perms 0700)
*
* @param path path to the dir
*
* @return TRUE if a read/writeable directory `path' exists after
* leaving this function, FALSE otherwise
*/
gboolean mu_util_create_dir_maybe (const gchar *path);
G_END_DECLS
#endif /*__MU_UTIL_H__*/