create_directory_structure {saros.base}R Documentation

Create a Pre-defined Directory Hierarchy on Disk

Description

Create a Pre-defined Directory Hierarchy on Disk

Usage

create_directory_structure(
  path,
  structure_path = system.file("templates", "_project_structure_en.yaml", package =
    "saros.base"),
  numbering_prefix = c("none", "max_local", "max_global"),
  numbering_inheritance = TRUE,
  word_separator = NULL,
  numbering_parent_child_separator = word_separator,
  numbering_name_separator = " ",
  case = c("asis", "sentence", "title", "lower", "upper", "snake"),
  replacement_list = c(project_initials = "SSN"),
  create = FALSE,
  count_existing_folders = FALSE
)

Arguments

path

String, path to where to create the project files

structure_path

String. Path to the YAML file that defines the folder structure. Defaults to system.file("templates", "_project_structure_en.yaml").

numbering_prefix

String. One of c("none", "max_local", "max_global").

numbering_inheritance

Flag. Whether to inherit numbering from parent folder.

word_separator

String. Replace separators between words in folder names. Defaults to NULL.

numbering_parent_child_separator

String. Defaults to word_separator.

numbering_name_separator

String. Separator between numbering part and name.

case

String. One of c("asis", "sentence", "lower", "upper", "title", "snake").

replacement_list

named character vector. Each name in this vector will be replaced with its "{{value}}" in the structure_path file

create

Boolean. Defaults to TRUE in initialize_saros_project(), FALSE in create_directory_structure().

count_existing_folders

Boolean. Defaults to FALSE.

Value

No return value, called for side effects

Examples

struct <- create_directory_structure(path = tempdir(), create = FALSE)

[Package saros.base version 1.1.0 Index]