Pulls file structure for a given repository.
Usage
get_files_structure(
gitstats_object,
pattern = NULL,
depth = Inf,
cache = TRUE,
verbose = is_verbose(gitstats_object),
progress = verbose
)
Arguments
- gitstats_object
A GitStats object.
- pattern
An optional regular expression. If defined, it pulls file structure for a repository matching this pattern.
- depth
An optional integer. Defines level of directories to retrieve files from. E.g. if set to
0
, it will pull files only from root, if1
, will take data fromroot
directory and directories visible inroot
directory. If left with no argument, will pull files from all directories.- cache
A logical, if set to
TRUE
GitStats will retrieve the last result from its storage.- verbose
A logical,
TRUE
by default. IfFALSE
messages and printing output is switched off.- progress
A logical, by default set to
verbose
value. IfFALSE
nocli
progress bar will be displayed.
Examples
if (FALSE) { # \dontrun{
my_gitstats <- create_gitstats() %>%
set_github_host(
token = Sys.getenv("GITHUB_PAT"),
orgs = c("r-world-devs")
) %>%
set_gitlab_host(
token = Sys.getenv("GITLAB_PAT_PUBLIC"),
orgs = "mbtests"
)
get_files_structure(
gitstats_obj = my_gitstats,
pattern = "\\.md"
)
} # }