EVOLUTION-MANAGER
Edit File: resourcePaths.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Resource Publishing</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for addResourcePath {shiny}"><tr><td>addResourcePath {shiny}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Resource Publishing</h2> <h3>Description</h3> <p>Add, remove, or list directory of static resources to Shiny's web server, with the given path prefix. Primarily intended for package authors to make supporting JavaScript/CSS files available to their components. </p> <h3>Usage</h3> <pre> addResourcePath(prefix, directoryPath) resourcePaths() removeResourcePath(prefix) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>prefix</code></td> <td> <p>The URL prefix (without slashes). Valid characters are a-z, A-Z, 0-9, hyphen, period, and underscore. For example, a value of 'foo' means that any request paths that begin with '/foo' will be mapped to the given directory.</p> </td></tr> <tr valign="top"><td><code>directoryPath</code></td> <td> <p>The directory that contains the static resources to be served.</p> </td></tr> </table> <h3>Details</h3> <p>Shiny provides two ways of serving static files (i.e., resources): </p> <ol> <li><p> Static files under the <code style="white-space: pre;">www/</code> directory are automatically made available under a request path that begins with <code>/</code>. </p> </li> <li> <p><code>addResourcePath()</code> makes static files in a <code>directoryPath</code> available under a request path that begins with <code>prefix</code>. </p> </li></ol> <p>The second approach is primarily intended for package authors to make supporting JavaScript/CSS files available to their components. </p> <p>Tools for managing static resources published by Shiny's web server: </p> <ul> <li> <p><code>addResourcePath()</code> adds a directory of static resources. </p> </li> <li> <p><code>resourcePaths()</code> lists the currently active resource mappings. </p> </li> <li> <p><code>removeResourcePath()</code> removes a directory of static resources. </p> </li></ul> <h3>See Also</h3> <p><code><a href="reexports.html">singleton()</a></code> </p> <h3>Examples</h3> <pre> addResourcePath('datasets', system.file('data', package='datasets')) resourcePaths() removeResourcePath('datasets') resourcePaths() # make sure all resources are removed lapply(names(resourcePaths()), removeResourcePath) </pre> <hr /><div style="text-align: center;">[Package <em>shiny</em> version 1.5.0 <a href="00Index.html">Index</a>]</div> </body></html>