20 uid_t owner, gid_t group,
bool root)
22 if (s_in !=
"." && mkdir(s_in.c_str(), mode) == -1) {
24 +
string(strerror(errno)));
32 if (mkdir((s_in +
"/cur").c_str(), mode) == -1) {
34 +
string(strerror(errno)));
38 if (mkdir((s_in +
"/new").c_str(), mode) == -1) {
40 +
string(strerror(errno)));
44 if (mkdir((s_in +
"/tmp").c_str(), mode) == -1) {
46 +
string(strerror(errno)));
50 if (owner == 0 && group == 0)
53 if (chown(s_in.c_str(), owner, group) == -1) {
55 +
string(strerror(errno)));
59 if (chown((s_in +
"/cur").c_str(), owner, group) == -1) {
61 +
string(strerror(errno)));
65 if (chown((s_in +
"/new").c_str(), owner, group) == -1) {
67 +
string(strerror(errno)));
71 if (chown((s_in +
"/tmp").c_str(), owner, group) == -1) {
73 +
string(strerror(errno)));
void setLastError(const std::string &error) const
bool createMailbox(const std::string &s, mode_t mode, uid_t owner=0, gid_t group=0, bool root=false)
Declaration of the Maildir class.