How to tell if a directory exists!!

sebouh181

New Member
Hello..

I just want to know if there is a function that can tell me if a directory exists or not!!!

Thanks in advance,
Regards

Sebouh
 
No, you need to write something like (untested):

Code:
FUNCTION DirectoryExists RETURNS LOGICAL
  ( cDirectory AS CHARACTER) :

FILE-INFO:FILE-NAME = cDirectory.

IF INDEX(FILE-INFO:FILE-TYPE, 'D') > 0 THEN
    RETURN TRUE.
ELSE
    RETURN FALSE.

END FUNCTION.
 
Is there a way to tell what the attributes are on that directory? It seems that FILE-INFO:FILE-TYPE always returns that the directory is RW, but I know that my directory is not writable!
 
Back
Top