tmpl_register: Registers the template specified with the path argument.

Description Usage Arguments Details See Also Examples

Description

Registers the template specified with the path argument.

Usage

1
tmpl_register(path = NULL, global = FALSE)

Arguments

path

path to the directory where the template should be created (type: character, default: NA)

global

flag specifying if the template will be registered in the user's local template directory (taken from rsuite.user_templ_path) or in the global template directory (/etc/.rsuite/templates on Linux platforms)

Details

All templates have specific requirements: Project templates have to contain a PARAMETERS file. Package templates have to contain a DESCRIPTION file.

The user's local template directory is taken from the rsuite.user_templ_path option. The global template is specified as '/etc/.rsuite/templates' and only concerns Linux platforms

See Also

Other miscellaneous: rsuite_check_version, rsuite_getLogger, rsuite_get_ci_adapter_names, rsuite_get_os_info, rsuite_get_rc_adapter_names, rsuite_get_repo_adapter_names, rsuite_register_ci_adapter, rsuite_register_rc_adapter, rsuite_register_repo_adapter, rsuite_unregister_ci_adapter, rsuite_unregister_rc_adapter, rsuite_unregister_repo_adapter, rsuite_update

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  # setup
  old_option_value <- getOption("rsuite.user_templ_path")
  tmpl_dir <- tempfile("user_templates_")
  dir.create(tmpl_dir, recursive = TRUE, showWarnings = FALSE)

  options(rsuite.user_templ_path = tmpl_dir)
  user_templ <- tempfile("usr_templ_")

  # initialize template from builtin
  tmpl_start(basename(user_templ), path = tempdir())
  # register it
  tmpl_register(user_templ)

  # clean up
  options(rsuite.user_templ_path = old_option_value)
  unlink(tmpl_dir, recursive = TRUE, force = TRUE)
  unlink(user_templ, recursive = TRUE, force = TRUE)

RSuite documentation built on June 10, 2019, 5:03 p.m.