R/RcppExports.R

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Retrieve all configuration settings
#'
#' This functions returns all configuration settings which can be queried
#' in a data.frame object. The system-level functions \code{sysconf},
#' \code{pathconf} and \code{confstr} provide all the underlying information.
#'
#' @title Return all System Configuration Settings
#' @param path An optional character object specifying a path. Default is the
#' current directory.
#' @return A data.frame with three colums for key, value and (source) type.
#' Not all keys return a value; in those cases an empty string is returned.
#' Type is one of \code{path}, \code{sys} and \code{conf} and signals how the
#' value was obtained.
#' @author Dirk Eddelbuettel
#' @seealso \code{\link{getConfig}}
#' @examples
#' if (Sys.info()[["sysname"]] != "SunOS") {
#'     head(getAll(), 30)
#'     subset(getAll(), type=="path")
#' }
getAll <- function(path = ".") {
    .Call('_RcppGetconf_getAll', PACKAGE = 'RcppGetconf', path)
}

#' Retrieve one configuration setting
#'
#' This functions returns the configuration setting for a given input.
#' in a data.frame object. The system-level functions \code{sysconf},
#' \code{pathconf} and \code{confstr} provide the underlying information.
#'
#' @title Return a System Configuration Setting
#' @param var An character object specifying a value for which configuration
#' is queried.
#' @param path An optional character object specifying a path. Default is the
#' current directory.
#' @return A result value corresponding to the requested setting. The return
#' type can be either integer for a numeric value, character for text or NULL
#' in case to value could be retrieved.
#' @author Dirk Eddelbuettel
#' @seealso \code{\link{getAll}}
#' @examples
#' if (Sys.info()[["sysname"]] != "SunOS") {
#'     getConfig("_NPROCESSORS_CONF")   # number of processor
#'     getConfig("LEVEL1_ICACHE_SIZE")  # leve1 cache size
#'     getConfig("GNU_LIBC_VERSION")    # libc version
#' }
getConfig <- function(var, path = ".") {
    .Call('_RcppGetconf_getConfig', PACKAGE = 'RcppGetconf', var, path)
}

Try the RcppGetconf package in your browser

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

RcppGetconf documentation built on May 1, 2019, 9:45 p.m.