Dumb Windows path parsing

Kenneth Brody kenbrody at bestweb.net
Tue Nov 29 08:44:15 PST 2005


Quoting GCC (Tue, 29 Nov 2005 11:26:12 -0500):
[...]
> What were you doing when you discovered the above?
[...]

I was trying to determine an easy way of checking "is this a directory"
by checking the existance of a "\." appended to a pathname.  The stat()
system call succeeds even if a regular file is specified.  In other
words, "c:\appl\fp\dclerk.exe\." exists as far as stat() is concerned.
(Though you cannot actually access such a filename.)

Yes I know that, in C, I can check the st_mode value for _S_IFDIR, but
I was trying this in filePro with EXISTS().

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list