get_files() may be used in two ways: either with pattern (with
optional depth) or file_path argument defined.
In the first scenario, GitStats will pull first a files structure
responding to the passed pattern and depth arguments and afterwards
files content for all of these files. In the second scenario, GitStats
will pull only the content of files for the specific file_path of the
repository.
If user wants to pull a particular file or files, a file_path approach
seems more reasonable, as it is a faster way since it omits pulling the
whole file structure from the repo.
For example, if user wants to pull content of README.md and/or NEWS.md
files placed in the root directories of the repositories, he should take
the file_path approach as he already knows precisely paths of the files.
On the other hand, if user wants to pull specific type of files (e.g. all
.md or .Rmd files in the repository), without knowing their path, it is
recommended to use a pattern approach, which will trigger GitStats to
find all the files in the repository on the given level of directories
(pattern argument) and afterwards pull their content.
The latter approach is slower than the former but may be more useful
depending on users' goals. Both approaches return data in the same format:
tibble with data on files, namely their path and their content.