R/checkInputFile.R

Defines functions checkInputFile

#' Utility method; create temporary file if necessary
#' 
#' @param file a string or XMLInternalDocument
#' @return location of file 
#' 
#' @concept paxtoolsr
#' @noRd
checkInputFile <- function(file) {
    if(typeof(file) == "externalptr") {
        tmp <- tempfile()
        saveXML(file, tmp)
        
        file <- tmp
    }
    
    return(file)
}
cannin/paxtoolsr documentation built on Jan. 13, 2018, 4:53 p.m.