path_strip_shiny: Strip a file path to everything after resourcepath if shiny...

View source: R/utils_shiny.R

path_strip_shinyR Documentation

Strip a file path to everything after resourcepath if shiny is running

Description

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

Usage

path_strip_shiny(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_to(), read_js(), shiny_error_recover(), strip_html()

Examples

path_strip_shiny("inst/app/www/img/image.jpg")

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