help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Difference between file-accessible-directory-p() and file-readable-p


From: Glenn Morris
Subject: Re: Difference between file-accessible-directory-p() and file-readable-p() on a directory
Date: Thu, 24 Sep 2009 18:04:22 -0700
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Nordlöw wrote:

> What's the difference between file-accessible-directory-p and file-
> readable-p when the argument is a directory?

mkdir foo bar
chmod 500 foo
chmod 400 bar

cd bar  # Permission denied
cd foo  # No problem

(file-accessible-directory-p "foo")  ; t
(file-readable-p "foo")              ; t

(file-accessible-directory-p "bar")  ; nil
(file-readable-p "bar")              ; t

You need execute permission to access a directory (on a Unix-type
system; no idea about Windows).


reply via email to

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