Re: Obtaining the destination of a symbolic link
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Obtaining the destination of a symbolic link
- From: Hisham <h@...>
- Date: 2016年6月20日 20:42:56 -0300
On 20 June 2016 at 19:23, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> The symbolic link yyy points to zzz.
>
> I want to get zzz given yyy. The follwing code does it if ypu have bash.
>
> print (io.popen"ls -l yyy":read():match"->%s*(.*)$")
>
> Is there a system-independent way? Tried lfs; failed.
My guess was that lfs.symlinkattributes would return this information,
but its absence seems an oversight.
I just implemented this feature:
https://github.com/keplerproject/luafilesystem/pull/76
-- Hisham