Package 'dir'

Title: Interactive Directory Listing
Description: A HTML widget for pretty directory listing with collapsible folders.
Authors: Emi Tanaka [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-1455-259X>)
Maintainer: Emi Tanaka <[email protected]>
License: MIT + file LICENSE
Version: 1.0.0
Built: 2026-07-05 08:33:46 UTC
Source: https://github.com/emitanaka/dir

Help Index


Shiny bindings for dir

Description

Output and render functions for using dir within Shiny applications and interactive Rmd documents.

Usage

dirOutput(outputId, width = "100%", height = "400px")

renderDir(expr, env = parent.frame(), quoted = FALSE)

Arguments

outputId

output variable to read from

width, height

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

expr

An expression that generates a dir

env

The environment in which to evaluate expr.

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.


Directory listing

Description

Create a HTML directory listing that is best used for R Markdown documents with HTML outputs, including for HTML presentations.

Usage

listing(
  path = ".",
  recurse = TRUE,
  show_hidden = FALSE,
  open = TRUE,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

path

A path.

recurse

If TRUE recurse fully, if a positive number the number of levels to recurse.

show_hidden

If TRUE show hidden files and folders.

open

Whether the folders should be open by default.

width, height

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

elementId

The element ID.

Value

A list of files and folders.

Examples

## Not run: 
listing(system.file(package = "dir"))

## End(Not run)