|
From: Petr M. <mi...@ph...> - 2006-03-02 22:10:56
|
What do you think about adding function
fileexist("a.dat")
that would return 1 or 0 if file exists or does not exist?
I think there is a good chance this name does not clash with most user
variables.
I have already needed that several times ... solution via `test` is not
portable ...
The code is as easy as
return (access(filename, F_OK) != 0))
see the attachment.
---
PM |