Dumb Windows path parsing
Bob Stockler
bob at trebor.iglou.com
Wed Nov 30 08:43:43 PST 2005
Ken Brody wrote (on Tue, Nov 29, 2005 at 11:44:15AM -0500):
| 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.)
Is it too much trouble to first use EXISTS() to see if the file
exists, and then use OPENDIR() to see if it's a directory?
A three or so years ago, unhappy with the amount of information
filePro could give me about a file, I wrote a KornShell script
to be used as a USER program to tell me _everything_ I wanted
to know about it (did it exist, could filePro read it, could
filePro write to it, was it a regular file, a directory, a named
pipe, a special file, did filePro own it, etc.).
Too bad filePro on Windows doesn't support the USER command.
Bob
--
Bob Stockler +-+ bob at trebor.iglou.com +-+ http://members.iglou.com/trebor
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).
More information about the Filepro-list
mailing list