get.config.type: Get config file type retreiving json/ini/yaml or FALSE

View source: R/configtype.R

get.config.typeR Documentation

Get config file type retreiving json/ini/yaml or FALSE

Description

Get config file type retreiving json/ini/yaml or FALSE

Usage

get.config.type(file = Sys.getenv("R_CONFIGFILE_ACTIVE", "config.cfg"), ...)

Arguments

file

File name of configuration file to test. Defaults to the value of the 'R_CONFIGFILE_ACTIVE' environment variable ('config.cfg' if the variable does not exist and JSON/INI/YAML/TOML format only)

...

Arguments for is.json.file, is.ini.file, is.yaml.file, is.toml.file

Value

Character json/ini/yaml/toml or Logical FALSE indicating that is not standard JSON/INI/YAML/TOML format file

See Also

is.json.file, is.ini.file, is.yaml.file, is.toml.file

Examples

config.json <- system.file('extdata', 'config.json', package='configr')
config.ini <- system.file('extdata', 'config.ini', package='configr')
config.yaml <- system.file('extdata', 'config.yaml', package='configr')
config.toml <- system.file('extdata', 'config.toml', package='configr')
get.config.type(file=config.json)
get.config.type(file=config.ini)
get.config.type(file=config.yaml)
get.config.type(file=config.toml)

Miachol/configr documentation built on July 22, 2023, 9:55 a.m.