[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file-symlink-p for remote files?

From: Stefan Monnier
Subject: Re: file-symlink-p for remote files?
Date: Tue, 08 Apr 2003 14:31:55 -0400

> Let's say I have a remote system with a symlink, like so:
> $ ls -ld /foo
> lrwxrwxrwx    1 root     root            9 Feb 28 14:51 /foo -> /bar
> Note that the symlink target is given as an absolute name.
> Which value should be returned by (file-symlink-p "/address@hidden:/foo")?
> (1) "/address@hidden:/bar"
> (2) "/bar"
> (3) something else, please specify: ___________________________

I like to think of symlinks as "special files" that can contain arbitrary
text (as used for example by Emacs in its file locking protocol),
but in practice this poses problems, so I think the right answer is
option (1).  See for example ange-ftp.
The reason is that there are elisp routines (such as file-truename
I guess) that do the symlink-dereference manually rather than relying
on the OS to do it for use.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]