isdir()

The function checks if a specified directory exists.

Synopsis

bool isdir(string path);

Parameters

Parameter Description
path The directory path. You can specify an absolute path or a relative path from the PROJ_PATH directory.

Return value

The function returns 1 if the directory exists and 0 if it does not.

Error

-

Description

The function checks if the specified directory "test1" exists. If it does exist, the value 1 will be returned. If it does not exist, the value 0 will be returned. If the parameter would, for example, be "C://test1//test1.txt",the function would return 0 since test1.txt is a file.

Example

main()
{
   bool result;
   result= isdir("C://test1");
   DebugN(result);
}

Assignment

File functions

Availability

CTRL