libremail+tools: Add mailbox_create() function
It is best to prefer mailbox_create() rather than try_mkdir() directly as we'll be able to encapslate mailbox creation logic within it. Signed-off-by: Chloe M. <chloe@mirocom.org>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2026, Chloe Moffett
|
||||
* Provided under the BSD-3 clause
|
||||
*/
|
||||
|
||||
#ifndef LIBREMAIL_MAILBOX_H
|
||||
#define LIBREMAIL_MAILBOX_H 1
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
/*
|
||||
* Create a mailbox directory
|
||||
*
|
||||
* @path: Path to mailbox to create
|
||||
* @mode: Mode to assign to directory
|
||||
*
|
||||
* Returns zero on success
|
||||
*/
|
||||
int mailbox_create(const char *path, mode_t mode);
|
||||
|
||||
#endif /* !LIBREMAIL_MAILBOX_H */
|
||||
Reference in New Issue
Block a user