[Top][All Lists]

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

Re: locate-file in Emacs

From: Eli Zaretskii
Subject: Re: locate-file in Emacs
Date: Thu, 18 Apr 2002 19:39:35 +0300 (IDT)

On Thu, 18 Apr 2002, Stefan Monnier wrote:

> But I have one question left: should the `file-directory-p' check be enforced
> independently from `predicate' ?
> I.e. can (locate-file f p s 'file-readable-p) return a directory ?

My vote is for NO, for a couple of reasons:

  - it is rare for a program to want to find files and directories alike, 
    so using file-directory-p is not a nuisance, in practice;

  - different filesystems impose different limitations on what system 
    calls work on directories (for example, some won't let you `read' a 
    directory), so the application will have to filter non-files anyway.

Of course, compatibility considerations could render these reasons less 

reply via email to

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