mbox-file.c revision 3f190f4cbb9233a3a6830956cb5c7ae56a577b79
a2c10cf31d14bac598f5cd008973375c3f9575a6Lukas Slebodnik/* Copyright (C) 2002-2003 Timo Sirainen */
a2c10cf31d14bac598f5cd008973375c3f9575a6Lukas Slebodnikint mbox_file_open(struct index_mailbox *ibox)
a2c10cf31d14bac598f5cd008973375c3f9575a6Lukas Slebodnik fd = open(ibox->path, ibox->mbox_readonly ? O_RDONLY : O_RDWR);
a2c10cf31d14bac598f5cd008973375c3f9575a6Lukas Slebodnik if (fd == -1 && errno == EACCES && !ibox->mbox_readonly) {
a2c10cf31d14bac598f5cd008973375c3f9575a6Lukas Slebodnikvoid mbox_file_close(struct index_mailbox *ibox)
a2c10cf31d14bac598f5cd008973375c3f9575a6Lukas Slebodnikint mbox_file_open_stream(struct index_mailbox *ibox)
a2c10cf31d14bac598f5cd008973375c3f9575a6Lukas Slebodnik i_stream_create_mmap(ibox->mbox_fd, default_pool,
a2c10cf31d14bac598f5cd008973375c3f9575a6Lukas Slebodnik i_stream_create_file(ibox->mbox_fd, default_pool,
a2c10cf31d14bac598f5cd008973375c3f9575a6Lukas Slebodnik i_stream_create_raw_mbox(default_pool, ibox->mbox_file_stream);