View source: R/encode_decode.R
as_file_list | R Documentation |
This function converts a file into a structured list for encoding.
as_file_list(path, name = fs::path_file(path), type = NULL)
path |
A character string specifying the file path. |
name |
An optional character string specifying the file name. |
type |
An optional character string specifying the file type ("text" or "binary"). |
A structured list representing the file.
## Not run:
# Convert a text file to a list
as_file_list("file.txt")
# Convert a binary file to a list
as_file_list("image.jpg", type = "binary")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.