* Target of Symbolic Link
@ 2009-10-08 15:36 Nordlöw
2009-10-08 16:28 ` David Kastrup
2009-10-08 17:09 ` Eli Zaretskii
0 siblings, 2 replies; 3+ messages in thread
From: Nordlöw @ 2009-10-08 15:36 UTC (permalink / raw)
To: help-gnu-emacs
How do I in Lisp lookup the target of a symbolic link (if any)?
/Nordlöw
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Target of Symbolic Link
2009-10-08 15:36 Target of Symbolic Link Nordlöw
@ 2009-10-08 16:28 ` David Kastrup
2009-10-08 17:09 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: David Kastrup @ 2009-10-08 16:28 UTC (permalink / raw)
To: help-gnu-emacs
Nordlöw <per.nordlow@gmail.com> writes:
> How do I in Lisp lookup the target of a symbolic link (if any)?
file-symlink-p is a built-in function in `fileio.c'.
(file-symlink-p FILENAME)
Return non-nil if file FILENAME is the name of a symbolic link.
The value is the link target, as a string.
Otherwise it returns nil.
This function returns t when given the name of a symlink that
points to a nonexistent file.
[back]
Arguably a bad name for the function, since *-p functions usually just
return t or nil.
--
David Kastrup
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Target of Symbolic Link
2009-10-08 15:36 Target of Symbolic Link Nordlöw
2009-10-08 16:28 ` David Kastrup
@ 2009-10-08 17:09 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2009-10-08 17:09 UTC (permalink / raw)
To: help-gnu-emacs
> From: =?ISO-8859-1?Q?Nordl=F6w?= <per.nordlow@gmail.com>
> Date: Thu, 8 Oct 2009 08:36:53 -0700 (PDT)
>
> How do I in Lisp lookup the target of a symbolic link (if any)?
I think you want file-truename or file-chase-links.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-08 17:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-08 15:36 Target of Symbolic Link Nordlöw
2009-10-08 16:28 ` David Kastrup
2009-10-08 17:09 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.