R/check.if.executable.R

Defines functions check.if.executable

Documented in check.if.executable

#' @title Check Executable
#' 
#' Test if a file is executable
#' 
#' @param exe.path Character string with full path to the file to check.
#' @return Integer 0 if exe.path is executable, otherwise 1.
#' @export check.if.executable
check.if.executable <- function(exe.path){
	res <- system(paste("command -v",paste0("'",exe.path,"'"),">/dev/null 2>&1 || { echo >&2 ''; exit 1; }"))
	res
}
JeffWeinell/misc.wrappers documentation built on Sept. 20, 2023, 12:42 p.m.