mirror of https://github.com/djcb/mu.git
* mu-msg.[ch]: add mu_msg_is_readable
This commit is contained in:
parent
d291c5a9f5
commit
42d69b7501
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 {
|
||||
|
|
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
|
||||
* e.g. emacs)
|
||||
|
|
Loading…
Reference in New Issue