dirname: Overloads dirname with option to remove URL scheme...

View source: R/paths.R

dirnameR Documentation

Overloads dirname with option to remove URL scheme ('http://', etc.) Also changes dirname behavior so that the last part of a URL ending in / counts as a directory, not as a file

Description

Overloads dirname with option to remove URL scheme ('http://', etc.) Also changes dirname behavior so that the last part of a URL ending in / counts as a directory, not as a file

Usage

dirname(path, remove.scheme = FALSE)

Arguments

path

string or vector of strings of file names

remove.scheme

logical whether to remove URL scheme, defaults to FALSE

Examples

dirname("/dir1/dir2/file.ext", remove.scheme = TRUE)
dirname("/dir1/dir2/file.ext")


fcocquemas/hfty.helpers documentation built on Feb. 13, 2023, 7:25 a.m.