R/RcppExports.R

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

#' Test if a file has a BOM
#' @param path path to a file
#' @export
#' @examples
#' file_has_bom(system.file("examples", "stops.txt", package="bom"))
#' file_has_bom(system.file("examples", "stop_times.txt", package="bom"))
file_has_bom <- function(path) {
    .Call('bom_file_has_bom', PACKAGE = 'bom', path)
}

#' Get BOM type (file)
#'
#' @param path path to a file
#' @export
#' @examples
#' file_bom_type(system.file("examples", "stop_times.txt", package="bom"))
file_bom_type <- function(path) {
    .Call('bom_file_bom_type', PACKAGE = 'bom', path)
}

#' Test if a raw vector has a BOM
#' @param x raw vector
#' @export
#' @examples
#' raw_has_bom(readBin(system.file("examples", "stop_times.txt", package="bom"), "raw", 4))
raw_has_bom <- function(x) {
    .Call('bom_raw_has_bom', PACKAGE = 'bom', x)
}

#' Get BOM type (raw vector)
#' @param x raw vector
#' @export
#' @examples
#' raw_bom_type(readBin(system.file("examples", "stop_times.txt", package="bom"), "raw", 4))
raw_bom_type <- function(x) {
    .Call('bom_raw_bom_type', PACKAGE = 'bom', x)
}
hrbrmstr/bom documentation built on May 17, 2019, 4:55 p.m.