R/detect_os.R

Defines functions is_osx is_windows

#' @noRd
#' @title Test if the system is "Windows"
#' @description Test if the operating system is "Windows"
#' @return TRUE or FALSE
is_windows <- function() {
  "windows" %in% .Platform$OS.type
}

#' @noRd
#' @title Test if the system is "macOS"
#' @description Test if the operating system is "macOS"
#' @return TRUE or FALSE
is_osx <- function() {
  "unix" %in% .Platform$OS.type &&
    "Darwin" %in% Sys.info()["sysname"]
}
davidgohel/locatexec documentation built on Feb. 17, 2021, 9:46 a.m.