allowDirectories | R Documentation |
This function adds paths to existing directories to the list of allowed directories,
which can be accessed from the server. To any request for files from outside
of the allowed directories the server will response with 403 Forbidden
error.
rootDirectory
(see openPage
) can always be accessed. By default,
when the app is initialized, current working directory
is added to the list of allowed directories. Further changes
of the working directory will not have any affect on this list or files accessibility.
allowDirectories(dirs = NULL)
dirs |
Vector of paths to existing directories. Can be absolute paths, or paths relative to
the current working directory. If the specified directory doesn't exist, it will be ignored and a
warning will be produced. If |
This function is a wrapper around allowDirectories
method of class App
.
Absolute paths to all currently allowed directories, if dirs = NULL
.
openPage
(check arguments rootDirectory
and allowedDirectories
).
## Not run:
# to run this example an installed web browser is required
openPage()
# The directories must exist
allowDirectories(c("~/directory1", "../anotherDirectory"))
dirs <- allowDirectories()
closePage()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.