Recursively identifies all files in a GitHub repository and creates a file tree using the data.tree
package to create a simple, human-readable visualization of the folder hierarchy. Folders can be specified for exclusion in which case the number of elements within them is listed but not the names of those objects. This function only works on repositories (public or private) to which you have access.
Arguments
- repo
(character) full URL for a github repository (including "github.com")
- exclude
(character) vector of folder names to exclude from the file tree. If
NULL
(the default) no folders are excluded- quiet
(logical) whether to print an informative message as the contents of each folder is being listed and as the tree is prepared from that information
Examples
if (FALSE) { # \dontrun{
# Create a file tree for the `supportR` package GitHub repository
github_tree(repo = "github.com/njlyon0/supportR", exclude = c("man", "docs", ".github"))
} # }