unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Alex Kost <alezost@gmail.com>
To: j kalbhenn <jkal@posteo.eu>
Cc: guile-devel@gnu.org
Subject: Re: feature request: realpath
Date: Mon, 05 Jun 2017 22:47:02 +0300	[thread overview]
Message-ID: <87poeikyix.fsf@gmail.com> (raw)
In-Reply-To: <20170604213653.GA13541@sph-desktop.fritz.box> (j. kalbhenn's message of "Sun, 4 Jun 2017 21:36:53 +0000")

j kalbhenn (2017-06-04 21:36 +0000) wrote:

>> Guile provides "readlink".  Isn't it the thing you need?
>
> no, i am afraid not. readlink returns the target of a symbolic
> link. realpath resolves all directory references like ".." and "." and
> all symbolic links in a path and returns a path that does not include
> those things.

Oh, I see.  There is 'canonicalize-path' that can handle ".." and "."

> i have now implemented my own version of realpath in scheme (could have
> used the ffi probably), but since it is a standard lib function in C and
> guile offers many other posix functions, i thought it would be well
> suited for inclusion.

Yeah, I agree, I also expected to see 'realpath' in Guile :-)

-- 
Alex



  reply	other threads:[~2017-06-05 19:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-03 17:20 feature request: realpath j kalbhenn
2017-06-04 20:00 ` Alex Kost
2017-06-04 21:36   ` j kalbhenn
2017-06-05 19:47     ` Alex Kost [this message]
2017-06-06 13:33       ` J. Kalbhenn
2017-06-06 17:48         ` Alex Kost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87poeikyix.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=jkal@posteo.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).