[m-users.] file_exists? directory_exists?

emacstheviking objitsu at gmail.com
Sat Jun 29 23:06:47 AEST 2019

@Julien, yes! I RTFM-d and I spotted both `file_type` and
`check_file_accessibility` both of which filled the gap nicely; I merely
wanted to test for the presence of a file as a trigger to take certain
action hence my initial, somewhat disparaging remarks about see/seen !!!

I think that the lesson I have taken from this all so far is that I need to
keep the source code to the modules open; I have my own locally built from
Github version and VSCode open now, that way the syntax highlighting makes
it less likely for me to miss something in the visual noise that is a
monochrome PDF!

Thanks to everybody again, so far i am liking the mercury journey, as a
part-time Prolog hacker, it's very very interesting and I feel almost like
I did learning BASIC aged 11 in school!


On Sat, 29 Jun 2019 at 12:02, Julien Fischer <jfischer at opturion.com> wrote:

> Hi,
> On Sat, 29 Jun 2019, emacstheviking 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?
> You can use io.file_type/5.  If it returns an ok/1 result then the file
> exists and the argument will tell you what it is.
> Julien.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20190629/47334380/attachment.html>

More information about the users mailing list