add_file_in_dir | R Documentation |
Add / suppress / edit a file
add_file_in_dir( file, dir, yml, name, description = "", date_time_format = "%Y%m%d_%H%M%s" ) edit_file_in_dir( id, dir, yml, name = NULL, description = NULL, file = NULL, date_time_format = "%Y%m%d_%H%M%s" ) suppress_file_in_dir(id, dir, yml) get_yaml_info( yml, recorded_name = TRUE, date_time_format = "%Y%m%d_%H%M%s", add_img = FALSE, img_size = 30 )
file |
|
dir |
|
yml |
|
name |
|
description |
|
date_time_format |
|
id |
|
recorded_name |
|
add_img |
|
img_size |
|
These functions return a logical
indicating if operation succeeded or not
## Not run: yml <- file.path(getwd(), "test_sfm/config.yml") # will be created dir <- file.path(getwd(), "test_sfm") dir.create(dir) file <- system.file("translate/translate.csv", package = "shinydrive") # add one first file add_file_in_dir( file = file, dir = dir, yml = yml, name = "translate1", description = "" ) yaml::yaml.load_file(yml) list.files(dir) get_yaml_info(yml) # add second file add_file_in_dir( file = file, dir = dir, yml = yml, name = "translate_2", description = "This is cool" ) yaml::yaml.load_file(yml) list.files(dir) get_yaml_info(yml, recorded_name = F) # modify first file edit_file_in_dir( id = "2", dir = dir, yml = yml, name = "translate_2_mod", description = "So cool" ) yaml::yaml.load_file(yml) list.files(dir) # suppress first file suppress_file_in_dir(id = "1", dir = dir, yml = yml) yaml::yaml.load_file(yml) list.files(dir) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.