* mu-msg.[ch]: add mu_msg_is_readable
This commit is contained in:
11
src/mu-msg.c
11
src/mu-msg.c
@ -671,6 +671,17 @@ mu_msg_cmp (MuMsg *m1, MuMsg *m2, MuMsgFieldId mfid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
mu_msg_is_readable (MuMsg *self)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (self, FALSE);
|
||||||
|
|
||||||
|
return (access (get_str_field (self, MU_MSG_FIELD_ID_PATH), R_OK)
|
||||||
|
== 0) ? TRUE : FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum _MaildirType {
|
enum _MaildirType {
|
||||||
|
|||||||
10
src/mu-msg.h
10
src/mu-msg.h
@ -358,6 +358,16 @@ int mu_msg_cmp (MuMsg *m1, MuMsg *m2, MuMsgFieldId mfid);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check whether there there's a readable file behind this message
|
||||||
|
*
|
||||||
|
* @param self a MuMsg*
|
||||||
|
*
|
||||||
|
* @return TRUE if the message file is readable, FALSE otherwise
|
||||||
|
*/
|
||||||
|
gboolean mu_msg_is_readable (MuMsg *self);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* convert the msg to a Lisp symbolic expression (for further processing in
|
* convert the msg to a Lisp symbolic expression (for further processing in
|
||||||
* e.g. emacs)
|
* e.g. emacs)
|
||||||
|
|||||||
Reference in New Issue
Block a user