R/snippets--files-and-dirs.R
get_path_rstudio_snippets_dir.RdCreate a string with a path to directory for RStudio snippets. The directory might not exist.
get_path_rstudio_snippets_dir(rstudio_version = "current")(string) Path to directory for RStudio snippets.
if (interactive()) {
# Regularly, you should use this:
get_path_rstudio_snippets_dir()
}
# For testing purposes:
get_path_rstudio_snippets_dir("1.4.1103")
#> /home/runner/.config/snippets
get_path_rstudio_snippets_dir("1.2.5044")
#> /home/runner/.R/snippets