R.utils
R.utils copied to clipboard
is there another way to list all files on Windows?
This code has been around for a very long time.
https://github.com/HenrikBengtsson/R.utils/blob/0382c2e4628f53e5ca9ef821484e28443b87cc2f/R/Sys.readlink2.R#L49-L50
Note that code moved to: https://github.com/HenrikBengtsson/R.utils/blob/2daa30cd8598a917781fa45cccda8ee58dee2c7d/R/Sys.readlink.Windows.R#L32-L40
Would there be another way to do this?
It feels like windows loses encoding.
Doing dir directly in the terminal works and shows output correctly, while when read in R, loses encoding.
I tried many ways to try and fix it, but I can't find th solution.
When I execute this in the shell
10 Rép(s) 46 547 070 976 octets libres
but in R
shell("dir", shell=Sys.getenv("COMSPEC"),
mustWork=TRUE, intern=TRUE)
#> [31] " 10 R\x82p(s) 47\xff277\xff817\xff856 octets libres"
follow-up to https://github.com/HenrikBengtsson/R.cache/issues/52