pureBasename: Return File Name without Extension

View source: R/pureBasename.R

pureBasenameR Documentation

Return File Name without Extension

Description

As opposed to basename(), this function returns the pure basename of one or multiple file names, i.e. without extension.

Usage

pureBasename(path, slash = FALSE)

Arguments

path

File name(s) as character.

slash

A logical determining whether to add a leading slash ("/") to the returned file name.

Value

File name(s) without extension as character.

Author(s)

Florian Detsch

See Also

tools::file_path_sans_ext().

Examples

ifl = tempfile(fileext = ".tif")
pureBasename(ifl)
pureBasename(ifl, slash = TRUE)


Orcs documentation built on Jan. 6, 2023, 5:14 p.m.