dir_name: get directory name of url or path

Description Usage Arguments Details Value

View source: R/urltools.R

Description

dir_name() get directory name of url or path. It works similar to but a little different from dirname().

Usage

1

Arguments

path

character.

Details

It doesn't works on single file name, i.e. dir_name('foo/bar') is okay but dir_name('foobar') doesn't return what you want. Since it is used to transform relative url to absolute url, dir_name('www.github.com') must return 'www.github.com'.

Value

character. with tailing '/'


dongzhuoer/rget documentation built on July 29, 2020, 1:45 p.m.