[m-users.] file_exists? directory_exists?
raoknz at gmail.com
Sun Jun 30 00:42:01 AEST 2019
Using see + seen does not test whether a file *exists* but whether
a file exists *and you are allowed to read it*.
It has always been the case in Unix that the only way to determine
if a file exists and you are allowed to read it is to try to open it
for input, thanks to the existence of concurrent processes.
With NFS, you can successfully open a file for input and
then be told "you can't do that" when you try to read it.
And then there's the possibility that a file might exist
and you might be allowed to read it, but the name you
have for it goes through a directory you aren't allowed
It you think too deeply about all the things that can go
wrong with testing whether a file "exists" you will go
mad. MAD, I say! We're all DOOMED!
On Sat, 29 Jun 2019 at 19:03, emacstheviking <objitsu at gmail.com> wrote:
> All I have found is see/seen to see if a file exists. Have I missed
> something totally obvious ?
> And how about checking the existence of a directory too?
> It feels bad to have to use "see" and then "seen" (to undo see) just to
> test a file exists.
> I am sure I have not found the docs but TBH they doc are just the code for
> the module and when you are learning this stuff it makes it pretty hard to
> find anything at times.
> users mailing list
> users at lists.mercurylang.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users