[Rd] dir.exists returns FALSE on Symlink directory

Stephen H. Dawson, DSL @erv|ce @end|ng |rom @hd@w@on@com
Mon Jun 26 17:16:34 CEST 2023


It sounds like either R as a whole or the R session does not have 
permission to view the directory.


*Stephen Dawson, DSL*
/Executive Strategy Consultant/
Business & Technology
+1 (865) 804-3454
http://www.shdawson.com


On 6/26/23 11:07, Ivan Krylov wrote:
> В Mon, 26 Jun 2023 10:26:07 -0400
> Dipterix Wang <dipterix.wang using gmail.com> пишет:
>
>> If I symlink a directory, is symlink considered as directory in R?
> It seems to work, at least on GNU/Linux:
>
> # (on this system, /var/lock is a symbolic link pointing to /run/lock/)
> system('ls -l /var/lock')
> # lrwxrwxrwx 1 root root <...> /var/lock -> /run/lock
> dir.exists('/var/lock')
> # [1] TRUE
>
>> If so, why `dir.exists` returns FALSE on directory?
> Which operating system? Judging by your User-Agent, it must be some
> version of macOS. Can you provide the output of `ls -l` on the symbolic
> link?
>



More information about the R-devel mailing list