On Thu, Jul 15, 2010 at 12:59 AM, Faré <span dir="ltr"><<a href="mailto:fahree@gmail.com">fahree@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

we use TRUENAME + HANDLER-CASE precisely because the file (or<br>
directory, most of the time) doesn't necessarily exist and we're<br>
trying to fully resolve any symlinks along the path, so that in the<br>
end we may apply translations to normalized pathnames.<br></blockquote></div><br>But Rene,  (ignore-errors (return (truename p))) = (probe-file p) with the difference that the latter can be implemented much more efficiently.<br>

<br>TRUENAME has a cost that is proportional to the number of directory components and to this you must add the cost of establishing a handler-bind and the jump outside the function due to the error.<br><br>PROBE-FILE first probes the existence of the file, which can be done with a *single* system call. No error handling is required: if the file does not exist, nothing else is done, but if the file exists, then its truename is returned -- as per TRUENAME, with symlinks resolved.<br>

<br>Am I missing something?<br><br>Juanjo<br clear="all"><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com">http://juanjose.garciaripoll.googlepages.com</a><br>