basenameSansExt: Base name without the file extension

View source: R/basenameSansExt.R

basenameSansExtR Documentation

Base name without the file extension

Description

Base name without the file extension

Usage

basenameSansExt(path)

Arguments

path

character. File path(s). This function is vectorized and supports multiple files.

Value

character. Character vector of same length as path input, with file extension removed. Returns NA if no extension is detected.

Note

This function intentionally doesn't check whether a file exists.

Updated 2019-10-22.

See Also

  • basename().

  • tools::file_path_sans_ext().

Examples

path <- c("dir/foo.txt", "bar.tar.gz", "DESCRIPTION")
basenameSansExt(path)

acidgenomics/AcidBase documentation built on Jan. 28, 2024, 2:59 a.m.