From sven.templer at gmail.com  Mon Feb 29 09:34:00 2016
From: sven.templer at gmail.com (Sven E. Templer)
Date: Mon, 29 Feb 2016 09:34:00 +0100
Subject: [Rd] Sys.readlink (on BSD vs Linux)
Message-ID: <10D14BD3-2646-4A1C-BA2A-5B93414D2436@icloud.com>

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 used in `normalizePath`.

I suggest (at least the latter) to
* use realpath instead readlink within Sys.readlink (do_readlink -> do_normalizepath)
* link to `normalizePath` in the Rd document, eventually mentioning the difference

Many thanks,
Sven

[1] see
https://www.freebsd.org/cgi/man.cgi?query=readlink
vs
http://linux.die.net/man/1/readlink

[2]
https://www.freebsd.org/cgi/man.cgi?query=realpath
http://linux.die.net/man/1/realpath


---------------------------

Sven E. Templer
Bioinformatics Core Group

Max Planck Institute for Biology of Ageing
Joseph-Stelzmann-Strasse 9b
50931 Cologne, Germany

Phone: 0049 (0)221 37970 325
templer at age.mpg.de
http://www.age.mpg.de/the-science/core-facilities/bioinformatics/



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