R/reg_repos.R
add_reg_folders.Rd
add_reg_folders
sets
options('nat.templatebrains.regdirs') appropriately so that registrations
can be found by e.g. xform_brain
.
extra_reg_folders
lists extra registration folders
present in standard location
add_reg_folders(dir = extra_reg_folders(), first = TRUE)
extra_reg_folders(full.names = TRUE)
Path to one or more folders containing registrations. Default value will scan for registration folders in a standard location. (Please see Details and File layout sections)
Whether the new folder should be added to the start (default) or end of the search list.
Whether to list full path to registration folders
This function is principally called for its side effect. A path to the location on disk containing added registrations is returned invisibly.
When dir
is unset then it will default to the value of
extra_reg_folders()
i.e. any folders / cloned repositories in the
standard location
You must pass a folder containing one or more registrations, not the registration folder itself. So if you have this situation on disk
myregistrations/
myregistrations/reg1.list
myregistrations/reg2.list
you should write add_reg_folders("/path/to/myregistrations")
if (FALSE) {
add_reg_folders("myextraregistrations")
}
# adding a non-existent folder will generate an error
tools::assertError(add_reg_folders(tempfile()))