Skip to content

Testing for symbolic links

2 messages · Gregoire Pau, Rolf Turner

#
On 25/03/2009, at 6:29 AM, Gregoire Pau wrote:

            
Since symbolic links are a Unix thing, I assume you are working on a  
system
that is sufficiently Unix-like for the following roll-your-own to work:

cfsl <- function(file) {
# cfsl <--> "check for symbolic link"
xxx <- system(paste("ls -l",file),intern=TRUE)
if(substr(xxx,1,1)=="l") TRUE else FALSE
}

HTH

	cheers,

		Rolf Turner


######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}