path_strip_to: Strip a file path to everything after resourcepath

View source: R/utils_shiny.R

path_strip_toR Documentation

Strip a file path to everything after resourcepath

Description

Useful for linking to internal files, such as with image source attributes ⁠<img src="[path]">⁠

Usage

path_strip_to(path, resourcepath = "www", leading_slash = FALSE)

Arguments

path

chr

resourcepath

chr A resource path specified in app_ui.R

leading_slash

lgl If leading slash should be included TRUE or removed FALSE.

Value

chr without stripped directories

See Also

Other shiny: as_js(), glue_js(), nm_to_id(), path_strip_shiny(), read_js(), shiny_error_recover(), strip_html()

Examples

path_strip_to("inst/app/www/img/myimage.svg", "www")

yogat3ch/UU documentation built on May 31, 2024, 10:14 p.m.