[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: file-exists-p on empty string
From: |
Stefan Monnier |
Subject: |
Re: file-exists-p on empty string |
Date: |
Wed, 27 Feb 2019 14:30:26 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>>> I use `(and (not (string-empty-p fn)) (file-exists-p fn))` at the
>>> moment, but its kind of ugly
>> Why do you need to reject empty strings?
> Filenames are generated externally, and the tool uses empty string
> notion for no-file semantic
So the (not (string-empty-p fn)) test just reflects the tool's semantics
and is not an artifact of some suboptimal behavior of file-exists-p.
Stefan
- Re: file-exists-p on empty string, (continued)
Re: file-exists-p on empty string, lg . zevlg, 2019/02/27
Re: file-exists-p on empty string, lg . zevlg, 2019/02/27