R/filePathChoices.R

Defines functions filePathChoices

Documented in filePathChoices

#' Update File Path Choices
#'
#' @param existing current string value given in properties
#' @param newPath optional, new path to add to list
#'
#' @return the new set of choices, essentially c(existing, newPath)
#'
filePathChoices = function(existing, newPath=NULL){
    if ( BioLockR::isReadableValue( existing ) ){
        oldSet = BioLockR::parseListProp( existing )
    }else{
        oldSet = c()
    }
    if (!is.null(newPath)) opts = c(oldSet, newPath)
    else opts = oldSet
    names(opts) <- NULL
    return(opts)
}
IvoryC/shinyBioLockJ documentation built on May 29, 2021, 7:40 a.m.