add_file_in_dir {shinydrive} | R Documentation |
Add / suppress / edit a file
Description
Add / suppress / edit a file
Usage
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
)
Arguments
file |
|
dir |
|
yml |
|
name |
|
description |
|
date_time_format |
|
id |
|
recorded_name |
|
add_img |
|
img_size |
|
Value
These functions return a logical
indicating if operation succeeded or not
Examples
## 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)
[Package shinydrive version 0.1.3 Index]