[Ecls-list] Merge DELETE-FILE and RMDIR?
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Thu Oct 13 08:48:09 UTC 2011
On Thu, Oct 13, 2011 at 1:24 AM, Mark Cox <markcox80 at gmail.com> wrote:
> I have two issues with respect to the merging of DELETE-FILE and
> RMDIR:
>
> 1. For physical pathnames it seems straightforward, but I do
> wonder if there are any unexpected gotchas when using logical
> pathnames.
>
Understood, but here the user must understand that logical pathnames are not
physical objects. An invalid pathname translation also has problems with
delete-files, as it would do one that changes a file into a directory and
viceversa.
2. DELETE-FILE is defined by the CLHS. People who use ECL without
> reading too much of the CLHS may expect DELETE-FILE to behave
> similarly across implementations. For example, it was a huge shock to
> me that in CLISP, PROBE-FILE signals an error when called with a
> pathname that represents a directory.
>
This is a different field. So far no implementation has restrained from
having unspecified behavior because ECL users might be confused, and this
includes incorrect LOOP forms, but this is not the case. As Waldek pointed
out, the key point is the definition of file (
http://clhs.lisp.se/Body/26_glo_f.htm#file), which talks about a named entry
in the file system. If ECL already considers directories to be valid files
for PROBE-FILE, then it is inconsistent in not allowing to delete them, and
failing to rename them for some fo the syntaxes.
> This is one area where a CDR would be beneficial to the community to
> try and address some of these inconsistencies.
>
Indeed, but in the mean time things have to get done :-) And besides, I
doubt anyone feels confident enough to redo the pathname stuff in Common
Lisp.
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20111013/cb950d91/attachment.html>
More information about the ecl-devel
mailing list