emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 9dc306b1: Improve reporting of I/O, access errors


From: Michael Albinus
Subject: Re: master 9dc306b1: Improve reporting of I/O, access errors
Date: Fri, 20 Sep 2019 21:22:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Paul Eggert <address@hidden> writes:

Hi Paul,

>> For such signals we have `access-file'. We shouldn't move its
>> functionality to `file-attributes'.
>
> access-file is different: it signals an error if you cannot access
> (actually, read) a file, and if you cannot access the file because you
> cannot search its parent directory then that's simply another reason
> that you cannot access the file. In contrast, a predicate like
> file-exists-p is supposed to tell you whether the file exists
> regardless of whether you can access it.

I'm speaking about file-attributes, not file-exists-p, which should not
raise an error when a file cannot be accessed.

My point is that file-attributes shall return nil, if it cannot provide
the information, for *whatever* reason. That's the contract of
file-attributes for decades.

If I want to know whether a file exists, or whether a file is
accessible, I use file-exists-p or access-file.


Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]