## ------------------------------------------------
## Method `FileBlock$from_list`
## ------------------------------------------------
FileBlock <- getFromNamespace("FileBlock", "teal.reporter")
block <- FileBlock$new()
file_path <- tempfile(fileext = ".png")
saveRDS(iris, file_path)
block$from_list(list(basename = basename(file_path)), dirname(file_path))
## ------------------------------------------------
## Method `FileBlock$to_list`
## ------------------------------------------------
FileBlock <- getFromNamespace("FileBlock", "teal.reporter")
block <- FileBlock$new()
block$to_list(tempdir())
Run the code above in your browser using DataLab