item_list_files(recursive=T) restricted to 20 children max default of item_list_children()
- Dominant language
- R
- Stars
- 24
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
Now that sciencebase items are being reworked to remove heavily nested child items, many of those items are being unnested and pushed up as separate child items, under the parent page.
You can customize the number of children you access in `item_list_children()` with the `limit = X` argument, with the default of 20 covering most-uses cases. With this new sciencebase restructuring, there are many cases of pages with more than 20 items, so this argument is quite important.
However, you can't customize the number of child items searched through with `item_list_files()`, as it uses a default call to `item_list_files()`. That is, even with recursive=T, you will only ever return the files in the first 20(+1) child items for each page.
This would be easily patched by having `item_list_files()` accept a child_limit argument, which then gets passed to the internal call to `item_list_children()`
Here's an example where this fails. While this is an extreme example, it is the most downloaded item on sciencebase! `item_list_files` returns 436 files across 21 child items, but the sciencebase pages contain 2,385 files across 158 child items.
Reprex:
```
item_list_files("5669a79ee4b08895842a1d47", recursive = T)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.