directoryName: Safe Version of Base Function dirname()

View source: R/directoryName.R

directoryNameR Documentation

Safe Version of Base Function dirname()

Description

The base function dirname may fail if the path passed is too long. This version checks if the call of dirname() failed and gives a clear error message.

Usage

directoryName(x)

Arguments

x

a file path of which to get the path to the directory only

Value

path to directory of file path given in x

Examples

## Not run: 
directoryName(repeated("verylongpath/", 50))

## End(Not run)

KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.