DirectoryExists Method
The DirectoryExists method determines whether a directory exists.
This method has the following syntax:
integer = SessionObject.DirectoryExists(directory = varchar(256))
This method has the following parameter:
directory
Specifies the directory to check for
The method returns TRUE if the directory exists and FALSE otherwise.
The path specification must be appropriate for the operating system. The following example shows how to write an application that runs on both Windows and UNIX systems:
declare
os = integer not null;
path = varchar(100) not null;
ret = integer not null;
enddeclare
{
os = CurSession.OperatingSystem;
if (os = SY_UNIX) then
path = '/ingres/files/olddir';
else
path = 'c:\ingres\files\olddir';
endif;
ret = CurSession.DirectoryExists(directory = path);
...
}