Re: [Rd] Sys.readlink (on BSD vs Linux)

2016-02-29 Thread Sven Templer
Yes, `Sys.readlink` is returning values as explained/expected. I was very confused by mixing C library functions with coreutils and not reading careful enough, please excuse me for that. A link to `normalizePath` would be of help in the 'See Also' section, in my opinion. Regards, Sven > On 29

Re: [Rd] Sys.readlink (on BSD vs Linux)

2016-02-29 Thread Simon Urbanek
> On Feb 29, 2016, at 5:59 AM, Sven Templer wrote: > > Hello, > > sorry for not being clear enough. > > My problem is represented with the following code, running on OSX: > > mkdir ~/test > ln -s ~/test ~/testlink > touch ~/test/foo > Rscript -e

Re: [Rd] Sys.readlink (on BSD vs Linux)

2016-02-29 Thread Sven Templer
> On 29 Feb 2016, at 11:59, Sven Templer wrote: > > Also, I think the readlink.h imported to R to be the same as from the > system's `readlink` command, thus mimicking the command line difference. Please ignore this statement, sorry.

Re: [Rd] Sys.readlink (on BSD vs Linux)

2016-02-29 Thread Sven Templer
Hello, sorry for not being clear enough. My problem is represented with the following code, running on OSX: mkdir ~/test ln -s ~/test ~/testlink touch ~/test/foo Rscript -e 'Sys.readlink(c("~/test/foo", "~/testlink/foo")); normalizePath(c("~/test/foo","~/testlink/foo"))' I expected

Re: [Rd] Sys.readlink (on BSD vs Linux)

2016-02-29 Thread Mikko Korpela
On 29.02.2016 10:34, Sven E. Templer wrote: > Hello together, > > the function `Sys.readlink` uses the system's readlink command to resolve > symlink paths. On OSX/BSD the command has a different meaning than on Linux > [1]. > > There exists the tool 'realpath', which seems suitable for the

[Rd] Sys.readlink (on BSD vs Linux)

2016-02-29 Thread Sven E. Templer
Hello together, the function `Sys.readlink` uses the system's readlink command to resolve symlink paths. On OSX/BSD the command has a different meaning than on Linux [1]. There exists the tool 'realpath', which seems suitable for the task, at least applied at the command line level [2]. It is