base_name: get base directory name of url

Description Usage Arguments Details Value

View source: R/urltools.R

Description

base_name() get base directory name of url. In other words, extracts protocal (http or https) and domain name from url it It works similar to but a little different from basename().

Usage

1
base_name(url, tailing = T)

Arguments

url

character.

Details

Although www.foo.com/bar must actually be www.foo.com/bar/index.html, but it's also possible that bar is a file under domain root directory. So base_name() has to return www.foo.com

Value

character. with tailing '/'


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