save_attachments: Save all attachments from a 'msg" object

Description Usage Arguments Value Examples

View source: R/attach.r

Description

Save all attachments from a 'msg" object

Usage

1
save_attachments(msg_obj, path = getwd(), use_short = TRUE, quiet = FALSE)

Arguments

msg_obj

a message object read in with read_msg()

path

directory path to save attachments in (defaults to current directory)

use_short

if TRUE then use the "short" filename from the parsed message, otherwise use the "long" filename (if it exists)

quiet

if TRUE then no informative messages will be displayed

Value

a character vector of full path names of files written out (invisibly)

Examples

1
2
3
4
x <- read_msg(system.file("extdata/unicode.msg", package="msgxtractr"))
td <- tempdir()
res <- save_attachments(x, td)
for (f in res) unlink(f)

hrbrmstr/msgxtractr documentation built on May 10, 2021, 7:27 p.m.