tree: Generate a Directory Tree

Description Usage Arguments Note Examples

Description

Given a directory, generate a directory tree diagram.

Usage

1
2
3
tree(path = ".", include.files = TRUE, all.files = TRUE,
  use.data.tree = FALSE, out = NULL, additional = NULL,
  copy2clip = FALSE)

Arguments

path

A path to the directory.

include.files

logical. If TRUE files and drectories will be included.

all.files

logical. If FALSE, only the names of visible files are returned. If TRUE, all file names will be returned.

use.data.tree

logical. If TRUE the data.tree package is used to make the tree, otherwise system is invoked with the extrenal tree program. The former produces a "R6", "Node" object that can be manipulated accordingly. The latter will be faster in most cases.

out

An optional outfile (typically .txt) to print to.

additional

Additonal arguments passed to hrefhttps://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/tree.mspx?mfr=truetree (Windows) or tree (Unix).

copy2clip

logical. If TRUE attempts to copy to the clipboard via write_clip.

Note

The tree program must be installed to use use.data.tree = FALSE.

Examples

1
2
3
4
5
6
tree(system.file("", package = "base"), use.data.tree = TRUE)
## Not run: 
tree()
tree(.libPaths())

## End(Not run)

trinker/pathr documentation built on May 31, 2019, 9:41 p.m.