osf_ls_files | R Documentation |
List the files and directories in the top-level of an OSF project, component,
or directory. Specify a path
to list the contents of a particular
subdirectory.
osf_ls_files( x, path = NULL, type = "any", pattern = NULL, n_max = 10, verbose = FALSE )
x |
One of the following:
|
path |
List files within the specified subdirectory path. |
type |
Filter query by type. Set to |
pattern |
Character string used to filter for results that contain the
substring |
n_max |
Maximum number of results to return from OSF (default is 10).
Set to |
verbose |
Logical, indicating whether to print informative messages
about interactions with the OSF API (default |
An osf_tbl_file
with one row for each file or directory, ordered
by modification time.
osf_ls_nodes()
to generate a list of projects and components.
## Not run: # Retrieve the Psychology Reproducibility Project from OSF psych_rp <- osf_retrieve_node("ezum7") # List all files and directories osf_ls_files(psych_rp) # ...only the directories osf_ls_files(psych_rp, type = "folder") # ...only PDF files osf_ls_files(psych_rp, type = "file", pattern = "pdf") # List the contents of the first directory osf_ls_files(psych_rp, path = "RPP_SI_Figures") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.