Learn R Programming

Orcs (version 1.2.3)

pureBasename: 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)

Value

File name(s) without extension as character.

Arguments

path

File name(s) as character.

slash

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

Author

Florian Detsch

See Also

Examples

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

Run the code above in your browser using DataLab