check_and_encode_files: Check that file paths exist and data is encoded if specified

View source: R/attachments.R

check_and_encode_filesR Documentation

Check that file paths exist and data is encoded if specified

Description

Check that file paths exist and data is encoded if specified

Usage

check_and_encode_files(dat, column = "Body", encode = TRUE, n_check = 100)

Arguments

dat

tbl_df or list of information regarding attachments stored locally that will be encoded for use in the APIs.

column

character; a string that indicates which column in the dat argument is storing the body of information that needs to be encoded.

encode

logical; a indicator of whether the body column should be encoded in this step, which allows us to utilize this function for checking or checking and encoding.

n_check

integer; an integer specifying how many elements in the dat argument that should be checked to see if the referenced file path exists locally. This fails the function early if users accidentally specify the wrong path.

Note

This function is meant to be used internally. Only use when debugging.

See Also

Other Attachment functions: sf_create_attachment(), sf_delete_attachment(), sf_download_attachment(), sf_update_attachment()


salesforcer documentation built on March 18, 2022, 6:26 p.m.