R/file.check.R

Defines functions file.check

file.check <- function(file.path) {
    
    if (!(file.access(file.path, 0) == 0)) {
        stop("File '",file.path,"' does not exist.", call. = FALSE)
    }
    
    if (!(file.access(file.path, 4) == 0)) {
        stop("File '",file.path,"' does not have read permission.", call. = FALSE)
    }
}
HajkD/LTRpred documentation built on April 22, 2022, 4:35 p.m.