Skip to content

Commit 26c9c4c

Browse files
Copilotjeroen
andauthored
Fix vignette: replace inefficient do.call/lapply/file.info pattern (#509)
* Initial plan * Fix vignette: use file.info with full.names=TRUE instead of do.call/lapply pattern Co-authored-by: jeroen <216319+jeroen@users.noreply.github.com> Agent-Logs-Url: https://github.com/r-lib/fs/sessions/46edf87e-5ca3-4e25-b3e1-2ac4d1167515 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jeroen <216319+jeroen@users.noreply.github.com>
1 parent 687017d commit 26c9c4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vignettes/function-comparisons.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ base R functions:
4949
| fs | base | shell |
5050
| --- | --- | --- |
5151
| `dir_ls("path")` | `list.files("path")` | `ls path` |
52-
| `dir_info("path")` | `do.call(rbind, lapply(list.files("path"), file.info))` | `ls -al path` |
52+
| `dir_info("path")` | `file.info(list.files("path", full.names = TRUE))` | `ls -al path` |
5353
| `dir_copy("path", "new-path")` | `dir.create("new-path"); file.copy("path", "new-path", recursive=TRUE)` | `cp path new-path` |
5454
| `dir_create("path")` | `dir.create("path")` | `mkdir path` |
5555
| `dir_delete("path")` | `unlink("path", recursive = TRUE)` | `rm -rf path` |

0 commit comments

Comments
 (0)