ftree is an experimental and mostly useless R package. It has one
function, ftree()
that shows a file tree on your console.
Unicode doesn’t quite work correctly..
## this doesn't render in Github Markdown
library(ftree)
ftree(path = system.file(package = "ftree"))
#> [1] "/home/runner/work/_temp/Library/ftree"
#> [2] "-a"
#> [3] "-F"
#> /home/runner/work/_temp/Library/ftree
#> ├──🧾DESCRIPTION
#> ├──🧾INDEX
#> ├──🧾LICENSE
#> ├── Meta/
#> │ ├──🧾Rd.rds
#> │ ├──🧾features.rds
#> │ ├──🧾hsearch.rds
#> │ ├──🧾links.rds
#> │ ├──🧾nsInfo.rds
#> │ └──🧾package.rds
#> ├──🧾NAMESPACE
#> ├── R/
#> │ ├──🧾ftree
#> │ ├──🧾ftree.rdb
#> │ └──🧾ftree.rdx
#> ├── help/
#> │ ├──🧾AnIndex
#> │ ├──🧾aliases.rds
#> │ ├── figures/
#> │ │ └──🧾console-screenshot-1.png
#> │ ├──🧾ftree.rdb
#> │ ├──🧾ftree.rdx
#> │ └──🧾paths.rds
#> └── html/
#> ├──🧾00Index.html
#> └──🧾R.css
#>
#> 5 directories, 21 files
or render with no emoji
## note this should be equivalent to fs::dir_tree()
ftree(path = system.file(package = "ftree"), unicode = FALSE)
#> [1] "/home/runner/work/_temp/Library/ftree"
#> [2] "-a"
#> [3] "-F"
#> /home/runner/work/_temp/Library/ftree
#> ├── DESCRIPTION
#> ├── INDEX
#> ├── LICENSE
#> ├── Meta/
#> │ ├── Rd.rds
#> │ ├── features.rds
#> │ ├── hsearch.rds
#> │ ├── links.rds
#> │ ├── nsInfo.rds
#> │ └── package.rds
#> ├── NAMESPACE
#> ├── R/
#> │ ├── ftree
#> │ ├── ftree.rdb
#> │ └── ftree.rdx
#> ├── help/
#> │ ├── AnIndex
#> │ ├── aliases.rds
#> │ ├── figures/
#> │ │ └── console-screenshot-1.png
#> │ ├── ftree.rdb
#> │ ├── ftree.rdx
#> │ └── paths.rds
#> └── html/
#> ├── 00Index.html
#> └── R.css
#>
#> 5 directories, 21 files
Note that unicode rendering this doesn’t seem to work well when with rmarkdown in Windows. However, it should display fine in the console.
2021-10-18 18:27:58 ping1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.