X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fruby%2Fmessage.c;h=49dbace3afec546596fc15e117354f16b031689f;hp=1b2c01ef4cbfb79cb02b1305e2397644159540f6;hb=90a66779e1a6f8c98521925875fbb9a19aeaf68a;hpb=02369d031c1499e015db1736bd259d314d39b8cf diff --git a/bindings/ruby/message.c b/bindings/ruby/message.c index 1b2c01ef..49dbace3 100644 --- a/bindings/ruby/message.c +++ b/bindings/ruby/message.c @@ -110,6 +110,24 @@ notmuch_rb_message_get_filename(VALUE self) return rb_str_new2(fname); } +/* + * call-seq: MESSAGE.filanames => FILENAMES + * + * Get all filenames for the email corresponding to MESSAGE. + */ +VALUE +notmuch_rb_message_get_filenames(VALUE self) +{ + notmuch_filenames_t *fnames; + notmuch_message_t *message; + + Data_Get_Notmuch_Message(self, message); + + fnames = notmuch_message_get_filenames(message); + + return Data_Wrap_Struct(notmuch_rb_cFileNames, NULL, NULL, fnames); +} + /* * call-seq: MESSAGE.get_flag(flag) => true or false *