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

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

Re: Why does (file-exists-p "") return t?


From: Edgar Vincent
Subject: Re: Why does (file-exists-p "") return t?
Date: Thu, 09 Feb 2023 11:10:07 +0000

Gregory Heytings <gregory@heytings.org> writes:

> When the argument to file-exists-p is not an absolute file name, it is
> understood as being relative to default-directory.  Therefore with an empty
> string, file-exists-p checks whether default-directory exists, which is 
> normally
> the case.  But
>
> (let ((default-directory “/nonexistent”)) (file-exists-p “”))
>
> returns nil.

Thank you very much for your reply. This makes sense - and I’m sure it is 
mentioned somewhere
in the documentation.

Edgar Vincent



reply via email to

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