R/checkInputFilePc.R

Defines functions checkInputFilePc

#' Check input files from PC
#'
#' @param inputFile Path to file
#'
#' @details Program will terminate if checks are invalid
#'
#' @return No value is returned
#'
#' @concept paxtoolsr
#' @noRd
checkInputFilePc <- function(inputFile) {
  if(!file.exists(inputFile)) {
    stop("ERROR: inputFile not file.")
  }

  if(file.size(inputFile) > 1e9) {
    stop("ERROR: A maximum file size limit of 1GB has been placed on files being read. Reading larger files with this function may be very slow. Please contact package author for workarounds.")
  }
}

Try the paxtoolsr package in your browser

Any scripts or data that you put into this service are public.

paxtoolsr documentation built on Nov. 8, 2020, 8:29 p.m.