Description
Used to determine whether a specific directory exists within the operating system.
Syntax
retval = DirExists (path)
Parameters
The function has the following parameters:
Parameter | Description |
---|---|
path | The full path of the directory being tested. |
Returns
Value | Meaning |
---|---|
-1 | The path does not exist. |
0 | The path is valid however it is not a directory. |
1 | The path exists. |
Example
* Determine if c:\temp exists declare function DirExists declare subroutine Msg path = "C:\TEMP" retval = DirExists(path) begin case case retval = 0 msg(@window,'The path ':path:' exists but is not a directory.') case retval = 1 msg(@window,'The directory ':path:' does exist.') case retval = -1 msg(@window,'The directory ':path:' does not exist.') end case